mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-24 09:18:09 +00:00
fixed baseUrl in coin selection
This commit is contained in:
parent
1c89f3e975
commit
c3bcc5fe91
@ -10,9 +10,15 @@ import type { TrezorDevice } from '../../../flowtype';
|
||||
const CoinSelection = (props: Props): React$Element<string> => {
|
||||
const { location } = props.router;
|
||||
const { config } = props.localStorage;
|
||||
const selectedDevice = props.connect.selectedDevice;
|
||||
|
||||
const urlParams = location.state;
|
||||
const baseUrl: string = urlParams.deviceInstance ? `/device/${urlParams.device}:${urlParams.deviceInstance}` : `/device/${urlParams.device}`;
|
||||
let baseUrl: string = '';
|
||||
if (selectedDevice) {
|
||||
baseUrl = `/device/${selectedDevice.id}`;
|
||||
if (selectedDevice.instance) {
|
||||
baseUrl += `:${selectedDevice.instance}`;
|
||||
}
|
||||
}
|
||||
|
||||
const walletCoins = config.coins.map(item => {
|
||||
const url = `${ baseUrl }/network/${ item.network }/address/0`;
|
||||
|
Loading…
Reference in New Issue
Block a user