File tree Expand file tree Collapse file tree
lib/wallets/wallet/impl/sub_wallets Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -510,7 +510,8 @@ class SolanaTokenWallet extends Wallet {
510510 (e) =>
511511 e.containsKey ("parsed" ) &&
512512 e["program" ] == "spl-token" &&
513- e["parsed" ]["type" ] == "transferChecked" ,
513+ (e["parsed" ]["type" ] == "transferChecked" ||
514+ e["parsed" ]["type" ] == "transfer" ),
514515 );
515516
516517 if (splTransfers.length != 1 ) {
@@ -522,9 +523,17 @@ class SolanaTokenWallet extends Wallet {
522523 continue ;
523524 }
524525 final transfer = splTransfers.first;
525- final lamports = BigInt .parse (
526- transfer["parsed" ]["info" ]["tokenAmount" ]["amount" ].toString (),
527- );
526+ final transferType = transfer["parsed" ]["type" ] as String ;
527+ final BigInt lamports;
528+ if (transferType == "transferChecked" ) {
529+ lamports = BigInt .parse (
530+ transfer["parsed" ]["info" ]["tokenAmount" ]["amount" ].toString (),
531+ );
532+ } else {
533+ lamports = BigInt .parse (
534+ transfer["parsed" ]["info" ]["amount" ].toString (),
535+ );
536+ }
528537 final senderAddress = transfer["parsed" ]["info" ]["source" ] as String ;
529538 final receiverAddress =
530539 transfer["parsed" ]["info" ]["destination" ] as String ;
You can’t perform that action at this time.
0 commit comments