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

[Issue - 3713] Extension - Fix bug validating recipient balance when sending Substrate token #3771

Open
wants to merge 1 commit into
base: subwallet-dev
Choose a base branch
from

Conversation

tunghp2002
Copy link

No description provided.

@tunghp2002 tunghp2002 requested a review from nampc1 October 9, 2024 11:27
@tunghp2002 tunghp2002 self-assigned this Oct 9, 2024
@tunghp2002 tunghp2002 linked an issue Oct 9, 2024 that may be closed by this pull request
2 tasks
@saltict
Copy link

saltict commented Oct 9, 2024

🚀 Deployed on https://pr-3771--sw-web-runner.netlify.app

@saltict saltict temporarily deployed to pull request October 9, 2024 11:39 Inactive
@@ -189,7 +190,7 @@ export class BalanceService implements StoppableServiceInterface {
}

/** Subscribe token free balance of an address on chain */

Choose a reason for hiding this comment

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

Update

@@ -189,7 +190,7 @@ export class BalanceService implements StoppableServiceInterface {
}

/** Subscribe token free balance of an address on chain */
public async subscribeTransferableBalance (address: string, chain: string, tokenSlug: string | undefined, extrinsicType?: ExtrinsicType, callback?: (rs: AmountData) => void): Promise<[() => void, AmountData]> {
public async subscribeBalance (address: string, chain: string, tokenSlug: string | undefined, balanceType: 'transferable' | 'total', extrinsicType?: ExtrinsicType, callback?: (rs: AmountData) => void): Promise<[() => void, AmountData]> {

Choose a reason for hiding this comment

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

Should better create BalanceType Enum

@@ -1652,6 +1654,10 @@ export default class KoniExtension {
return await this.#koniState.balanceService.getTransferableBalance(address, networkKey, token, extrinsicType);
}

private async getAddressTotalBalance ({ address, extrinsicType, networkKey, token }: RequestFreeBalance): Promise<AmountData> {

Choose a reason for hiding this comment

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

Recheck with _MANTA_ZK_CHAIN_GROUP case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix bug validating recipient balance when sending Substrate token
3 participants