Skip to content

Commit

Permalink
Export api from TransferProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
JayJay1024 committed May 6, 2024
1 parent dc9a6c5 commit ad49070
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/providers/transfer-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { WalletAccount } from "@talismn/connect-wallets";
import { Signer } from "@polkadot/api/types";
import { notifyError, notifyTransaction, parseCross, signAndSendExtrinsic } from "@/utils";
import { useApi, useAssetDetails, useAssetLimit, useBalance } from "@/hooks";
import { ApiPromise } from "@polkadot/api";

interface TransferCtx {
assetLimit: BN | undefined;
Expand All @@ -30,6 +31,8 @@ interface TransferCtx {
activeRecipientAccount: WalletAccount | undefined;
activeSenderWallet: WalletID | undefined;
activeRecipientWallet: WalletID | undefined;
sourceApi: ApiPromise | undefined;
targetApi: ApiPromise | undefined;

setTransferAmount: Dispatch<SetStateAction<{ valid: boolean; input: string; amount: BN }>>;
setSourceChain: Dispatch<SetStateAction<ChainConfig>>;
Expand Down Expand Up @@ -81,6 +84,8 @@ const defaultValue: TransferCtx = {
activeRecipientAccount: undefined,
activeSenderWallet: undefined,
activeRecipientWallet: undefined,
sourceApi: undefined,
targetApi: undefined,

setTransferAmount: () => undefined,
setSourceChain: () => undefined,
Expand Down Expand Up @@ -195,6 +200,8 @@ export default function TransferProvider({ children }: PropsWithChildren<unknown
return (
<TransferContext.Provider
value={{
sourceApi,
targetApi,
assetLimit,
targetAssetDetails,
bridgeInstance,
Expand Down

0 comments on commit ad49070

Please sign in to comment.