fixed baseUrl in coin selection

pull/2/merge
Szymon Lesisz 6 years ago
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…
Cancel
Save