@kanalabs/kana-widget-v2
Version:
Kana Widget for cross-chain bridging and swap.
74 lines (73 loc) • 2.15 kB
TypeScript
import { NetworkId } from "@kanalabs/aggregator";
import { ProgressType } from "utils/types";
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 swapBridging {
status: string;
completionPercentage: number;
}
interface sourceChainSwap {
status: string;
hash: string;
completionPercentage: number;
}
interface targetChainSwap {
status: string;
hash: string;
completionPercentage: number;
}
interface SwapRoutesprops {
isRoutesVisible: boolean;
sourceInfo: SourceInfo;
targetInfo: TargetInfo;
showAllRoutes: boolean;
availableRoutes: any[];
selectedRoute: any;
setSelectedRoute: (route: any | null) => void;
sameChainEstimationTime: string;
handlePreviewRoute: (index: any) => void;
isPreviewRoute: number | null;
slippage: number;
setShowAllRoutes: (showAll: boolean) => void;
crossChainRoutes: any;
setSourceChainRoute: (route: any) => void;
setTargetChainRoute: (route: any) => void;
crossChainEstimationTime: string;
isSwapModalVisible: boolean;
sameChainSwap: ProgressType;
sourceChainSwap: sourceChainSwap;
swapBridging: swapBridging;
targetChainSwap: targetChainSwap;
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;
integratorFee: boolean;
handleRedeemTransition: () => void;
}
declare const SwapRoutes: React.FC<SwapRoutesprops>;
export default SwapRoutes;