@kanalabs/kana-widget-v2
Version:
Kana Widget for cross-chain bridging and swap.
59 lines (58 loc) • 1.6 kB
TypeScript
import { NetworkId } from "@kanalabs/aggregator";
import { ProgressType } from "utils/types";
interface sourceChainSwap {
status: string;
hash: string;
completionPercentage: number;
}
interface swapBridging {
status: string;
completionPercentage: number;
}
interface targetChainSwap {
status: string;
hash: string;
completionPercentage: number;
}
interface SourceInfo {
chainId: NetworkId;
chainName: string;
chainImg: string;
tokenSymbol: string;
tokenImg: string;
tokenAmount: string;
tokenAddress: string;
tokenBalance: number;
tokenDollarPrice: number;
}
interface TargetInfo {
chainId: NetworkId;
chainName: string;
chainImg: string;
tokenSymbol: string;
tokenImg: string;
tokenAmount: string;
tokenAddress: string;
tokenBalance: number;
tokenDollarPrice: number;
}
interface SwapModalProps {
sourceInfo: SourceInfo;
targetInfo: TargetInfo;
sameChainSwap: ProgressType;
sourceChainSwap: sourceChainSwap;
swapBridging: swapBridging;
targetChainSwap: targetChainSwap;
selectedRoute: any;
copyHash: (hash: any) => Promise<void>;
sourceChainRoute: any;
targetChainRoute: any;
redeemButtonVisibility: boolean;
closeSwapModal: () => void;
setRedeemViewVisibility: React.Dispatch<React.SetStateAction<boolean>>;
setRedeemButtonVisibility: React.Dispatch<React.SetStateAction<boolean>>;
closeSwapModalblur: () => void;
handleRedeemTransition: () => void;
}
declare const SwapModal: React.FC<SwapModalProps>;
export default SwapModal;