Skip to content

Commit

Permalink
feat(LLC): add token Mint field to solana device config
Browse files Browse the repository at this point in the history
  • Loading branch information
mikhd committed Mar 18, 2024
1 parent bf49d48 commit ef984ca
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ function fieldsForTokenTransfer(command: TokenTransferCommand): DeviceTransactio
label: "Transfer tokens",
});

fields.push({
type: "address",
address: command.mintAddress,
label: "Mint",
});

fields.push({
type: "address",
address: command.ownerAssociatedTokenAccountAddress,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,17 @@ export const acceptTransferTokensTransaction: DeviceAction<Transaction, any> = d
throwUnexpectedTransaction();
},
},
// {
// title: "Mint",
// button: SpeculosButton.RIGHT,
// expectedValue: ({ transaction }) => {
// const command = transaction.model.commandDescriptor?.command;
// if (command?.kind === "token.transfer") {
// return ellipsis(command.mintAddress);
// }
// throwUnexpectedTransaction();
// },
// },
{
title: "From",
button: SpeculosButton.RIGHT,
Expand Down Expand Up @@ -339,6 +350,17 @@ export const acceptTransferTokensWithATACreationTransaction: DeviceAction<Transa
throwUnexpectedTransaction();
},
},
// {
// title: "Mint",
// button: SpeculosButton.RIGHT,
// expectedValue: ({ transaction }) => {
// const command = transaction.model.commandDescriptor?.command;
// if (command?.kind === "token.transfer") {
// return ellipsis(command.mintAddress);
// }
// throwUnexpectedTransaction();
// },
// },
{
title: "From",
button: SpeculosButton.RIGHT,
Expand Down

0 comments on commit ef984ca

Please sign in to comment.