Added ARRR to GET_WALLET_ADDRESS

This commit is contained in:
Justin Ferrari 2023-11-21 13:03:47 -05:00
parent c9e70ce7cd
commit 6aad0b6e37

View File

@ -271,7 +271,7 @@ class WebBrowser extends LitElement {
const name = parts[0] const name = parts[0]
parts.shift() parts.shift()
let identifier let identifier
let path
if (parts.length > 0) { if (parts.length > 0) {
identifier = parts[0] // Do not shift yet identifier = parts[0] // Do not shift yet
// Check if a resource exists with this service, name and identifier combination // Check if a resource exists with this service, name and identifier combination
@ -2314,12 +2314,19 @@ class WebBrowser extends LitElement {
} }
const res3 = await showModalAndWait( const res3 = await showModalAndWait(
actions.GET_USER_WALLET actions.GET_USER_WALLET
); );
if (res3.action === 'accept') { if (res3.action === 'accept') {
let coin = data.coin; let coin = data.coin;
let userWallet = {}; let userWallet = {};
let arrrAddress = "";
if (coin === "ARRR") {
arrrAddress = await parentEpml.request('apiCall', {
url: `/crosschain/arrr/walletaddress?apiKey=${this.getApiKey()}`,
method: 'POST',
body: `${window.parent.reduxStore.getState().app.selectedAddress.arrrWallet.seed58}`
})
}
switch (coin) { switch (coin) {
case 'QORT': case 'QORT':
userWallet['address'] = window.parent.reduxStore.getState().app.selectedAddress.address userWallet['address'] = window.parent.reduxStore.getState().app.selectedAddress.address
@ -2346,6 +2353,7 @@ class WebBrowser extends LitElement {
userWallet['publickey'] = window.parent.reduxStore.getState().app.selectedAddress.rvnWallet.derivedMasterPublicKey userWallet['publickey'] = window.parent.reduxStore.getState().app.selectedAddress.rvnWallet.derivedMasterPublicKey
break break
case 'ARRR': case 'ARRR':
userWallet['address'] = arrrAddress
break break
default: default:
break break