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

[TypeScript SDK] Fix balance field #1999

Merged
merged 1 commit into from
May 17, 2022
Merged

[TypeScript SDK] Fix balance field #1999

merged 1 commit into from
May 17, 2022

Conversation

666lcz
Copy link
Contributor

@666lcz 666lcz commented May 17, 2022

There were some change on the Rust side in #1971 that's not reflected on the SDK side
CleanShot 2022-05-16 at 17 22 46

@666lcz 666lcz requested review from patrickkuo and stella3d May 17, 2022 00:26
@666lcz 666lcz requested a review from apburnie May 17, 2022 00:27
@@ -14,11 +16,11 @@ export class Coin {
return getMoveObjectType(data)?.startsWith('0x2::Coin::Coin') ?? false;
}

static getBalance(data: GetObjectInfoResponse): string | undefined {
static getBalance(data: GetObjectInfoResponse): BN | undefined {
Copy link
Contributor Author

@666lcz 666lcz May 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

balance can be u64(e.g. faucet) while JS only supports up to 53 bits

Copy link
Contributor

@patrickkuo patrickkuo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@666lcz 666lcz merged commit 16c8173 into main May 17, 2022
@666lcz 666lcz deleted the chris-fix-balance branch May 17, 2022 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants