Skip to content

Commit

Permalink
fix(callback): update callback type
Browse files Browse the repository at this point in the history
  • Loading branch information
hamidroohi92 committed Sep 30, 2024
1 parent 6aad946 commit 1c04537
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/providers/transfer-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ interface TransferCtx {
_sender: string | WalletAccount,
_recipient: string,
_amount: BN,
options?: { successCb: () => void; failedCb: () => void },
options?: { successCb: (receipt: any) => void; failedCb: () => void },
) => Promise<void>;
updateSourceAssetBalance: () => void;
updateTargetAssetBalance: () => void;
Expand Down Expand Up @@ -197,7 +197,7 @@ export default function TransferProvider({ children }: PropsWithChildren<unknown
_sender: string | WalletAccount,
_recipient: string,
_amount: BN,
options?: { successCb: () => void; failedCb: () => void },
options?: { successCb: (receipt: any) => void; failedCb: () => void },
) => {
if (typeof _sender === "string") {
return evmTransfer(_bridge, _sender, _recipient, _amount, options);
Expand Down
4 changes: 2 additions & 2 deletions src/utils/tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { notifyError, notifyExtrinsic } from ".";
import { ChainConfig } from "@/types";

const transferCb = {
successCb: () => {},
successCb: (receipt: any) => {},
failedCb: () => {},
};

Expand Down Expand Up @@ -32,7 +32,7 @@ export const signAndSendExtrinsic = async (
options.failedCb();
} else if (method === "ExtrinsicSuccess") {
notifyExtrinsic(result.txHash.toHex(), chain, true);
options.successCb();
options.successCb(result);
}
});
} else if (result.isError) {
Expand Down

0 comments on commit 1c04537

Please sign in to comment.