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

Merged
merged 15 commits into from
Dec 9, 2024

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

@PDTnhah PDTnhah self-assigned this Nov 21, 2024
@PDTnhah PDTnhah added this to the Milestone 8 milestone Nov 21, 2024
@saltict saltict temporarily deployed to pull request November 21, 2024 11:03 Inactive
@saltict saltict temporarily deployed to pull request November 26, 2024 11:28 Inactive
# Conflicts:
#	packages/extension-base/src/koni/background/handlers/Extension.ts
@saltict saltict temporarily deployed to pull request November 28, 2024 08:11 Inactive
@saltict saltict temporarily deployed to pull request November 29, 2024 09:15 Inactive
@saltict saltict temporarily deployed to pull request December 3, 2024 12:03 Inactive
@S2kael S2kael force-pushed the koni/dev/issue-3713-v2 branch from cb34078 to 0ab4af8 Compare December 6, 2024 08:41
@saltict saltict temporarily deployed to pull request December 6, 2024 08:51 Inactive
…i/dev/issue-3713-v2

# Conflicts:
#	packages/extension-base/src/koni/background/handlers/Extension.ts
@saltict saltict temporarily deployed to pull request December 6, 2024 09:40 Inactive
@saltict saltict merged commit ea8d9a5 into subwallet-dev Dec 9, 2024
3 checks passed
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
6 participants