1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-12-25 16:38:08 +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 { 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`;