mirror of
https://github.com/Qortal/q-trade.git
synced 2025-06-19 04:31:21 +00:00
fix types
This commit is contained in:
parent
dbf2c0394c
commit
d79e26da4b
@ -512,7 +512,6 @@ export const Header = ({
|
||||
setFee={setFee} />
|
||||
<UnsignedFees
|
||||
qortAddress={qortAddress}
|
||||
selectedCoin={selectedCoin}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
|
@ -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]);
|
||||
|
@ -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 = {
|
||||
|
2
src/global.d.ts
vendored
2
src/global.d.ts
vendored
@ -43,6 +43,8 @@ interface QortalRequestOptions {
|
||||
foreignBlockchain?: string;
|
||||
foreignAmount?: number;
|
||||
atAddress?: string;
|
||||
type?: string
|
||||
value?: string
|
||||
}
|
||||
|
||||
declare function qortalRequest(options: QortalRequestOptions): Promise<any>;
|
||||
|
Loading…
x
Reference in New Issue
Block a user