-
Notifications
You must be signed in to change notification settings - Fork 17
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
fix unknownAssetId bugs #1110
fix unknownAssetId bugs #1110
Conversation
6d92f29
to
9f05366
Compare
if (asset.balanceView?.valueView.case !== 'knownAssetId') | ||
throw new Error('unknown asset selected'); |
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.
We filter out unknown assets for ibc and swaps, but I believe there is no reason to disallow sending unknown assets
Not relevant to this PR, but maybe we don't need to show zero balances? |
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.
👍
Not relevant to this PR, but maybe we don't need to show zero balances?
Good idea, can you create an issue?
const renderPill = (formattedAmount: string, symbol: string, metadata?: Metadata) => ( | ||
<Pill variant={variant === 'default' ? 'default' : 'dashed'}> | ||
<div className='flex min-w-0 items-center gap-1'> | ||
{showIcon && ( | ||
<div className='-ml-2 mr-1 flex shrink-0 items-center justify-center rounded-full'> | ||
<AssetIcon metadata={metadata} size={size === 'default' ? 'sm' : 'xs'} /> | ||
</div> | ||
)} | ||
{showValue && ( | ||
<span className={cn('-mb-0.5 text-nowrap leading-[15px]', size === 'sm' && 'text-xs')}> | ||
{variant === 'equivalent' && <>~ </>} | ||
{formattedAmount} | ||
</span> | ||
)} | ||
{showDenom && ( | ||
<span className='truncate font-mono text-xs text-muted-foreground'>{symbol}</span> | ||
)} | ||
</div> | ||
</Pill> | ||
); |
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.
Can you make this a separate component instead of an inline function?
close #1107 & close #1108
1. Dashboard
Before:
After:
2. Send
Before:
After:
3. Tx page
Before:
After: