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

Fix token account parser type #409

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix token account parser type
Crypto Dypto committed Aug 11, 2022
commit 39fb34c75fd46fbb562846f3bf54b79c9b0c42bc
6 changes: 3 additions & 3 deletions src/parsers/spl.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { MintData, TokenAccountData } from "@saberhq/token-utils";
import type { MintData } from "@saberhq/token-utils";
import { deserializeAccount, deserializeMint } from "@saberhq/token-utils";

import type { AccountInfo } from "@solana/spl-token";
import type { AccountParser } from "./useParsedAccountsData";

/**
* Parses token accounts.
*/
export const TOKEN_ACCOUNT_PARSER: AccountParser<TokenAccountData> = (info) => {
export const TOKEN_ACCOUNT_PARSER: AccountParser<AccountInfo> = (info) => {
return {
address: info.accountId,
...deserializeAccount(info.accountInfo.data),
2 changes: 1 addition & 1 deletion src/tx/useHandleTXs.ts
Original file line number Diff line number Diff line change
@@ -282,7 +282,7 @@ export const useHandleTXsInternal = ({

if (waitForConfirmation) {
// await for the tx to be confirmed
await Promise.all(pending.map(async (p) => await p.wait()));
await Promise.all(pending.map((p) => p.wait()));
}

return {