diff --git a/src/components/header/Header.tsx b/src/components/header/Header.tsx index c1fa2aa..fc8f2f0 100644 --- a/src/components/header/Header.tsx +++ b/src/components/header/Header.tsx @@ -512,7 +512,6 @@ export const Header = ({ setFee={setFee} /> )} diff --git a/src/components/sell/FeeManager.tsx b/src/components/sell/FeeManager.tsx index 580396e..93857a0 100644 --- a/src/components/sell/FeeManager.tsx +++ b/src/components/sell/FeeManager.tsx @@ -63,7 +63,9 @@ export const FeeManager = ({ selectedCoin, setFee, fee }) => { setInfo(null); }; const coin = useMemo(() => { - return getCoinLabel(selectedCoin)?.toLowerCase(); + const coinLabel = getCoinLabel(selectedCoin) + if(typeof coinLabel !== 'string') return + return coinLabel?.toLowerCase(); }, [selectedCoin, getCoinLabel]); const establishUpdateFeeForm = useCallback(async (coin) => { @@ -111,7 +113,9 @@ export const FeeManager = ({ selectedCoin, setFee, fee }) => { const recommendedFeeDisplay = useMemo(() => { if (!selectedCoin || !recommendedFeeData) return null; - const coin = getCoinLabel(selectedCoin)?.toUpperCase(); + const coinLabel = getCoinLabel(selectedCoin) + if(typeof coinLabel !== 'string') return + const coin = coinLabel?.toUpperCase(); if(!recommendedFeeData[coin]) return null return recommendedFeeData[coin][recommendedFee]; }, [recommendedFeeData, recommendedFee, selectedCoin]); diff --git a/src/contexts/gameContext.ts b/src/contexts/gameContext.ts index dff3f1b..a7a2aa1 100644 --- a/src/contexts/gameContext.ts +++ b/src/contexts/gameContext.ts @@ -34,7 +34,7 @@ export interface IContextProps { isUsingGateway: boolean; selectedCoin: string; setSelectedCoin: (val: any)=> void; - getCoinLabel: ()=> string | null | void; + getCoinLabel: (val?: string)=> string | null | void; } const defaultState: IContextProps = { diff --git a/src/global.d.ts b/src/global.d.ts index f9bbd3d..cd9543e 100644 --- a/src/global.d.ts +++ b/src/global.d.ts @@ -43,6 +43,8 @@ interface QortalRequestOptions { foreignBlockchain?: string; foreignAmount?: number; atAddress?: string; + type?: string + value?: string } declare function qortalRequest(options: QortalRequestOptions): Promise;