Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update tokenAmount and splTokenTransferCheckedInfo models #276

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ class SplTokenTransferCheckedInfo {
required this.tokenAmount,
required this.source,
required this.destination,
required this.mint,
required this.multisigAuthority,
required this.signers,
});

factory SplTokenTransferCheckedInfo.fromJson(
Expand All @@ -22,4 +25,7 @@ class SplTokenTransferCheckedInfo {
final TokenAmount tokenAmount;
final String source;
final String destination;
final String mint;
final String multisigAuthority;
final List<String> signers;
ookami-kb marked this conversation as resolved.
Show resolved Hide resolved
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions packages/solana/lib/src/rpc/dto/token_amount.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class TokenAmount {
required this.amount,
required this.decimals,
required this.uiAmountString,
required this.uiAmount,
});

factory TokenAmount.fromJson(Map<String, dynamic> json) =>
Expand All @@ -24,4 +25,7 @@ class TokenAmount {

/// Token amount as a string, accounting for decimals.
final String? uiAmountString;

/// Token amount as a decimal number.
final double uiAmount;
ookami-kb marked this conversation as resolved.
Show resolved Hide resolved
}
2 changes: 2 additions & 0 deletions packages/solana/lib/src/rpc/dto/token_amount.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.