1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-28 03:08:30 +00:00

fixed baseUrl in coin selection

This commit is contained in:
Szymon Lesisz 2018-05-05 14:11:03 +02:00
parent 1c89f3e975
commit c3bcc5fe91

View File

@ -10,9 +10,15 @@ import type { TrezorDevice } from '../../../flowtype';
const CoinSelection = (props: Props): React$Element<string> => { const CoinSelection = (props: Props): React$Element<string> => {
const { location } = props.router; const { location } = props.router;
const { config } = props.localStorage; const { config } = props.localStorage;
const selectedDevice = props.connect.selectedDevice;
const urlParams = location.state; let baseUrl: string = '';
const baseUrl: string = urlParams.deviceInstance ? `/device/${urlParams.device}:${urlParams.deviceInstance}` : `/device/${urlParams.device}`; if (selectedDevice) {
baseUrl = `/device/${selectedDevice.id}`;
if (selectedDevice.instance) {
baseUrl += `:${selectedDevice.instance}`;
}
}
const walletCoins = config.coins.map(item => { const walletCoins = config.coins.map(item => {
const url = `${ baseUrl }/network/${ item.network }/address/0`; const url = `${ baseUrl }/network/${ item.network }/address/0`;