-
Notifications
You must be signed in to change notification settings - Fork 6
Eason/bugfix #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Eason/bugfix #34
Conversation
added hyperweb chain info
fix the Coin inport path issue
@@ -1,10 +1,21 @@ | |||
{ | |||
"editor.formatOnSave": true, | |||
"editor.defaultFormatter": "esbenp.prettier-vscode", | |||
"[javascript]": { | |||
"editor.formatOnSave": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enabled formatOnSave
boxShadow={`0px 4px 20px 0px rgba(${ | ||
theme === 'light' ? '0,0,0' : '128,128,128' | ||
}, 0.1)`} | ||
boxShadow={`0px 4px 20px 0px rgba(${theme === 'light' ? '0,0,0' : '128,128,128' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix format
@@ -95,7 +95,7 @@ export const SelectAssetItem = ({ | |||
> | |||
<PopoverTrigger> | |||
<SelectButton | |||
onClick={() => {}} | |||
onClick={() => { }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix format
@@ -86,7 +86,7 @@ export function Voting({ chainName }: VotingProps) { | |||
}; | |||
}); | |||
break; | |||
} catch (e) {} | |||
} catch (e) { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix format
</Box> | ||
); | ||
})} | ||
let tally = proposal.finalTallyResult; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix format
@@ -33,7 +33,8 @@ export const useStarshipChains = () => { | |||
|
|||
const assets = (await Promise.all( | |||
chains.map((chain) => | |||
fetcher<AssetList>(`${baseUrl}/chains/${chain.chain_id}/assets`) | |||
// @ts-ignore | |||
fetcher<AssetList>(`${baseUrl}/chains/${chain.chain_id}/assets`) // if use chainId, got error: Cannot read properties of undefined (reading 'chainName') at const { connect, disconnect, address, wallet } = useChain(selectedChain) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove or simplify comments
@@ -77,8 +104,15 @@ export const useChainUtils = (chainName: string) => { | |||
}; | |||
|
|||
const getExponentByDenom = (denom: CoinDenom): Exponent => { | |||
// Special handling for hyperweb native token | |||
if (denom === 'uhyper') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no hard-coded values
@@ -98,24 +132,39 @@ export const useChainUtils = (chainName: string) => { | |||
}; | |||
|
|||
const getChainName = (ibcDenom: CoinDenom) => { | |||
// Special handling for hyperweb native token | |||
if (ibcDenom === 'uhyper' && chainName === 'hyperweb') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no hard coded values
const signingClient = await getSigningJsdClient({ | ||
rpcEndpoint: rpcEndpoint!, | ||
signer: wallet.getOfflineSignerDirect(chain.chainId ?? ''), | ||
if (!rpcEndpoint) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
???
arg, | ||
}); | ||
return response; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
???
@@ -99,7 +99,7 @@ const OverviewTransferWrapper = ( | |||
const toastHandlers = useToastHandlers(); | |||
const { data: signingClient } = useSigningClient(sourceChainName); | |||
const { mutate: transfer, isLoading } = useTransfer({ | |||
clientResolver: signingClient, | |||
clientResolver: signingClient as any, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no any
I agree with Luca's reviews here, we should strive for strict type safe code unless the interfaces are unknown or can't be patched due to external packages. No |
upgrade chain-registry to 2.0
all functionalities works