4
1
mirror of https://github.com/Qortal/qortal-ui.git synced 2025-02-11 17:55:51 +00:00

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]
parts.shift()
let identifier
let path
if (parts.length > 0) {
identifier = parts[0] // Do not shift yet
// Check if a resource exists with this service, name and identifier combination
@ -2314,12 +2314,19 @@ class WebBrowser extends LitElement {
}
const res3 = await showModalAndWait(
actions.GET_USER_WALLET
);
if (res3.action === 'accept') {
let coin = data.coin;
let userWallet = {};
);
if (res3.action === 'accept') {
let coin = data.coin;
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) {
case 'QORT':
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
break
case 'ARRR':
userWallet['address'] = arrrAddress
break
default:
break