Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export const Assets = memo<TokenAssetsProps>(({ network }) => {
? setSelectToken({
open: true,
uuid: id,
title: t.wallets_add_token(),
FungibleTokenListProps: { whitelist: [] },
})
: setAddCollectibleOpen(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export function SelectTokenDialog(props: SelectTokenDialogProps) {
const [targetChainId, setChainId] = useState<ChainId | undefined>(chainId)
const [rowSize, setRowSize] = useState(54)

const [title, setTitle] = useState(t('plugin_wallet_select_a_token'))
const [disableNativeToken, setDisableNativeToken] = useState(true)
const [disableSearchBar, setDisableSearchBar] = useState(false)
const [FungibleTokenListProps, setFungibleTokenListProps] = useState<ERC20TokenListProps | null>(null)
Expand All @@ -71,6 +72,7 @@ export function SelectTokenDialog(props: SelectTokenDialogProps) {

const { open, setDialog } = useRemoteControlledDialog(WalletMessages.events.selectTokenDialogUpdated, (ev) => {
if (!ev.open) return
setTitle(ev.title ?? t('plugin_wallet_select_a_token'))
setId(ev.uuid)
setDisableNativeToken(ev.disableNativeToken ?? true)
setDisableSearchBar(ev.disableSearchBar ?? false)
Expand All @@ -97,11 +99,7 @@ export function SelectTokenDialog(props: SelectTokenDialogProps) {
}, [id, setDialog])

return (
<InjectedDialog
titleBarIconStyle={isDashboard ? 'close' : 'back'}
open={open}
onClose={onClose}
title={t('plugin_wallet_select_a_token')}>
<InjectedDialog titleBarIconStyle={isDashboard ? 'close' : 'back'} open={open} onClose={onClose} title={title}>
<DialogContent classes={{ root: classes.content }}>
<ERC20TokenList
classes={{ list: classes.list, placeholder: classes.placeholder }}
Expand Down
2 changes: 2 additions & 0 deletions packages/plugins/Wallet/src/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export type SelectTokenDialogEvent =
tokens?: FungibleTokenDetailed[]
selectedTokens?: string[]
}
title?: string
}
| {
open: false
Expand All @@ -125,6 +126,7 @@ export type SelectTokenDialogEvent =
* The selected detailed token.
*/
token?: FungibleTokenDetailed
title?: string
}

export type SelectNftContractDialogEvent = {
Expand Down