Merge pull request #122 from QuickMythril/unused-address

Add unused foreign address button
This commit is contained in:
AlphaX-Projects 2023-02-12 12:08:08 +01:00 committed by GitHub
commit 9da50eace1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 306 additions and 26 deletions

View File

@ -283,7 +283,8 @@
"wchange54": "Adressbuch exportieren", "wchange54": "Adressbuch exportieren",
"wchange55": "Ihr bestehendes Adressbuch wird gelöscht und aus einem Backup neu erstellt.", "wchange55": "Ihr bestehendes Adressbuch wird gelöscht und aus einem Backup neu erstellt.",
"wchange56": "WARNUNG!", "wchange56": "WARNUNG!",
"wchange57": "Memo" "wchange57": "Memo",
"wchange58": "Neue Adresse"
}, },
"tradepage": { "tradepage": {
"tchange1": "Handelsportal", "tchange1": "Handelsportal",

View File

@ -283,7 +283,8 @@
"wchange54": "Exportar libreta de direcciones", "wchange54": "Exportar libreta de direcciones",
"wchange55": "Su libreta de direcciones existente se eliminará y se creará una nueva copia de seguridad.", "wchange55": "Su libreta de direcciones existente se eliminará y se creará una nueva copia de seguridad.",
"wchange56": "ADVERTENCIA!", "wchange56": "ADVERTENCIA!",
"wchange57": "Memorándum" "wchange57": "Memorándum",
"wchange58": "Nueva Dirección"
}, },
"tradepage": { "tradepage": {
"tchange1": "Portal de Comercio", "tchange1": "Portal de Comercio",

View File

@ -283,7 +283,8 @@
"wchange54": "Exporter le carnet d'adresses", "wchange54": "Exporter le carnet d'adresses",
"wchange55": "Votre carnet d'adresses existant sera supprimé et une nouvelle sauvegarde sera créée.", "wchange55": "Votre carnet d'adresses existant sera supprimé et une nouvelle sauvegarde sera créée.",
"wchange56": "ATTENTION!", "wchange56": "ATTENTION!",
"wchange57": "Mémo" "wchange57": "Mémo",
"wchange58": "Nouvelle Adresse"
}, },
"tradepage": { "tradepage": {
"tchange1": "Portail de commerce", "tchange1": "Portail de commerce",

View File

@ -284,7 +284,8 @@
"wchange54": "निर्यात पता पुस्तिका", "wchange54": "निर्यात पता पुस्तिका",
"wchange55": "आपकी मौजूदा पता पुस्तिका हटा दी जाएगी और बैकअप से नया बनाया जाएगा।", "wchange55": "आपकी मौजूदा पता पुस्तिका हटा दी जाएगी और बैकअप से नया बनाया जाएगा।",
"wchange56": "चेतावनी!", "wchange56": "चेतावनी!",
"wchange57": "ज्ञापन" "wchange57": "ज्ञापन",
"wchange58": "नया पता"
}, },
"tradepage": { "tradepage": {
"tchange1": "व्यापार पोर्टल", "tchange1": "व्यापार पोर्टल",

View File

@ -283,7 +283,8 @@
"wchange54": "Izvezi adresar", "wchange54": "Izvezi adresar",
"wchange55": "Vaš postojeći adresar bit će izbrisan i novi će se stvoriti iz sigurnosne kopije.", "wchange55": "Vaš postojeći adresar bit će izbrisan i novi će se stvoriti iz sigurnosne kopije.",
"wchange56": "UPOZORENJE!", "wchange56": "UPOZORENJE!",
"wchange57": "Dopis" "wchange57": "Dopis",
"wchange58": "Nova Adresa"
}, },
"tradepage": { "tradepage": {
"tchange1": "Portal razmjene", "tchange1": "Portal razmjene",

View File

@ -283,7 +283,8 @@
"wchange54": "Címjegyzék exportálása", "wchange54": "Címjegyzék exportálása",
"wchange55": "Meglévő címjegyzéke törlésre kerül, és a biztonsági másolatból új jön létre.", "wchange55": "Meglévő címjegyzéke törlésre kerül, és a biztonsági másolatból új jön létre.",
"wchange56": "FIGYELEM!", "wchange56": "FIGYELEM!",
"wchange57": "Memo" "wchange57": "Memo",
"wchange58": "Új Cím"
}, },
"tradepage": { "tradepage": {
"tchange1": "Kereskedelmi Portál", "tchange1": "Kereskedelmi Portál",

View File

@ -283,7 +283,8 @@
"wchange54": "Esporta rubrica", "wchange54": "Esporta rubrica",
"wchange55": "La tua rubrica esistente verrà eliminata e dal backup verrà creata una nuova.", "wchange55": "La tua rubrica esistente verrà eliminata e dal backup verrà creata una nuova.",
"wchange56": "AVVERTIMENTO!", "wchange56": "AVVERTIMENTO!",
"wchange57": "Memo" "wchange57": "Memo",
"wchange58": "Nuovo Indirizzo"
}, },
"tradepage": { "tradepage": {
"tchange1": "Portale commerciale", "tchange1": "Portale commerciale",

View File

@ -283,7 +283,8 @@
"wchange54": "주소록 내보내기", "wchange54": "주소록 내보내기",
"wchange55": "기존 주소록이 삭제되고 백업에서 새로 생성됩니다.", "wchange55": "기존 주소록이 삭제되고 백업에서 새로 생성됩니다.",
"wchange56": "경고!", "wchange56": "경고!",
"wchange57": "메모" "wchange57": "메모",
"wchange58": "새 주소"
}, },
"tradepage": { "tradepage": {
"tchange1": "무역 포털", "tchange1": "무역 포털",

View File

@ -283,7 +283,8 @@
"wchange54": "Eksporter adressebok", "wchange54": "Eksporter adressebok",
"wchange55": "Din eksisterende adressebok vil bli slettet og ny opprettet fra sikkerhetskopi.", "wchange55": "Din eksisterende adressebok vil bli slettet og ny opprettet fra sikkerhetskopi.",
"wchange56": "ADVARSEL!", "wchange56": "ADVARSEL!",
"wchange57": "Memo" "wchange57": "Memo",
"wchange58": "Ny Adresse"
}, },
"tradepage": { "tradepage": {
"tchange1": "Handelsportal", "tchange1": "Handelsportal",

View File

@ -283,7 +283,8 @@
"wchange54": "Eksportuj książkę adresową", "wchange54": "Eksportuj książkę adresową",
"wchange55": "Twoja istniejąca książka adresowa zostanie usunięta, az kopii zapasowej utworzona nowa.", "wchange55": "Twoja istniejąca książka adresowa zostanie usunięta, az kopii zapasowej utworzona nowa.",
"wchange56": "OSTRZEŻENIE!", "wchange56": "OSTRZEŻENIE!",
"wchange57": "Memo" "wchange57": "Memo",
"wchange58": "Nowy Adres"
}, },
"tradepage": { "tradepage": {
"tchange1": "Portal Handlowy", "tchange1": "Portal Handlowy",

View File

@ -283,7 +283,8 @@
"wchange54": "Exportar catálogo de endereços", "wchange54": "Exportar catálogo de endereços",
"wchange55": "Seu catálogo de endereços existente será excluído e o backup será criado novamente.", "wchange55": "Seu catálogo de endereços existente será excluído e o backup será criado novamente.",
"wchange56": "AVISO!", "wchange56": "AVISO!",
"wchange57": "Memorando" "wchange57": "Memorando",
"wchange58": "Novo Endereço"
}, },
"tradepage": { "tradepage": {
"tchange1": "Portal do Comércio", "tchange1": "Portal do Comércio",

View File

@ -283,7 +283,8 @@
"wchange54": "Exportati agenda de adrese", "wchange54": "Exportati agenda de adrese",
"wchange55": "Agenda dvs. existenta va fi stearsa si din backup va fi creata o noua.", "wchange55": "Agenda dvs. existenta va fi stearsa si din backup va fi creata o noua.",
"wchange56": "AVERTIZARE!", "wchange56": "AVERTIZARE!",
"wchange57": "Nota" "wchange57": "Nota",
"wchange58": "Adresa noua"
}, },
"tradepage": { "tradepage": {
"tchange1": "Portal de Tranzactionare", "tchange1": "Portal de Tranzactionare",

View File

@ -283,7 +283,8 @@
"wchange54": "Izvezi adresar", "wchange54": "Izvezi adresar",
"wchange55": "Vaš postojeći adresar će biti obrisan, a iz rezervne kopije biće kreiran novi.", "wchange55": "Vaš postojeći adresar će biti obrisan, a iz rezervne kopije biće kreiran novi.",
"wchange56": "UPOZORENJE!", "wchange56": "UPOZORENJE!",
"wchange57": "Beleška" "wchange57": "Beleška",
"wchange58": "Nova Adresa"
}, },
"tradepage": { "tradepage": {
"tchange1": "Trgovinski prozor", "tchange1": "Trgovinski prozor",

View File

@ -283,7 +283,8 @@
"wchange54": "Экспорт адресной книги", "wchange54": "Экспорт адресной книги",
"wchange55": "Ваша существующая адресная книга будет удалена, а из резервной копии создана новая.", "wchange55": "Ваша существующая адресная книга будет удалена, а из резервной копии создана новая.",
"wchange56": "ПРЕДУПРЕЖДЕНИЕ!", "wchange56": "ПРЕДУПРЕЖДЕНИЕ!",
"wchange57": "Памятка" "wchange57": "Памятка",
"wchange58": "Новый Адрес"
}, },
"tradepage": { "tradepage": {
"tchange1": "Торговый портал", "tchange1": "Торговый портал",

View File

@ -283,7 +283,8 @@
"wchange54": "Export Address Book", "wchange54": "Export Address Book",
"wchange55": "Your existing address book will be deleted and from backup new created.", "wchange55": "Your existing address book will be deleted and from backup new created.",
"wchange56": "WARNING!", "wchange56": "WARNING!",
"wchange57": "Memo" "wchange57": "Memo",
"wchange58": "New Address"
}, },
"tradepage": { "tradepage": {
"tchange1": "Trade Portal", "tchange1": "Trade Portal",

View File

@ -283,7 +283,8 @@
"wchange54": "导出通讯录", "wchange54": "导出通讯录",
"wchange55": "您现有的通讯簿将被删除并从新创建的备份中。", "wchange55": "您现有的通讯簿将被删除并从新创建的备份中。",
"wchange56": "警告!", "wchange56": "警告!",
"wchange57": "备忘录" "wchange57": "备忘录",
"wchange58": "新的钱包地址"
}, },
"tradepage": { "tradepage": {
"tchange1": "交易门户", "tchange1": "交易门户",

View File

@ -283,7 +283,8 @@
"wchange54": "導出通訊錄", "wchange54": "導出通訊錄",
"wchange55": "您現有的通訊簿將被刪除並從新創建的備份中。", "wchange55": "您現有的通訊簿將被刪除並從新創建的備份中。",
"wchange56": "警告!", "wchange56": "警告!",
"wchange57": "備忘錄" "wchange57": "備忘錄",
"wchange58": "新的錢包地址"
}, },
"tradepage": { "tradepage": {
"tchange1": "交易門戶", "tchange1": "交易門戶",

View File

@ -62,6 +62,7 @@ class MultiWallet extends LitElement {
arrrMemo: { type: String }, arrrMemo: { type: String },
errorMessage: { type: String }, errorMessage: { type: String },
arrrWalletAddress: { type: String }, arrrWalletAddress: { type: String },
unusedWalletAddress: { type: String },
successMessage: { type: String }, successMessage: { type: String },
sendMoneyLoading: { type: Boolean }, sendMoneyLoading: { type: Boolean },
btnDisable: { type: Boolean }, btnDisable: { type: Boolean },
@ -357,8 +358,8 @@ class MultiWallet extends LitElement {
.wallet-address { .wallet-address {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 18px; font-size: 18px;
color: var(--black); color: var(--black);
margin: 4px 0 20px; margin: 4px 0 20px;
} }
@ -366,7 +367,7 @@ class MultiWallet extends LitElement {
display: inline-block; display: inline-block;
font-weight: 600; font-weight: 600;
font-size: 32px; font-size: 32px;
color: var(--black); color: var(--black);
} }
#transactions { #transactions {
@ -505,6 +506,13 @@ class MultiWallet extends LitElement {
position: relative; position: relative;
} }
.unused-address-dialog {
min-height: 150px;
min-width: 550px;
box-sizing: border-box;
position: relative;
}
.btn-clear-success { .btn-clear-success {
--mdc-icon-button-size: 32px; --mdc-icon-button-size: 32px;
color: red; color: red;
@ -561,6 +569,12 @@ class MultiWallet extends LitElement {
width: 185px; width: 185px;
} }
.unused-pos {
margin-top: -44px;
margin-left: 410px;
width: 185px;
}
@media (max-width: 863px) { @media (max-width: 863px) {
.wallet { .wallet {
width: 100%; width: 100%;
@ -673,6 +687,7 @@ class MultiWallet extends LitElement {
this.arrrRecipient = '' this.arrrRecipient = ''
this.arrrMemo = '' this.arrrMemo = ''
this.arrrWalletAddress = '' this.arrrWalletAddress = ''
this.unusedWalletAddress = ''
this.errorMessage = '' this.errorMessage = ''
this.successMessage = '' this.successMessage = ''
this.myElementId = '' this.myElementId = ''
@ -799,7 +814,7 @@ class MultiWallet extends LitElement {
${translate("walletpage.wchange2")} ${translate("walletpage.wchange2")}
<div class="wallet-address" ?hidden="${this.getSelectedWalletAddress().length < 1}"> <div class="wallet-address" ?hidden="${this.getSelectedWalletAddress().length < 1}">
<span>${this.getSelectedWalletAddress()}</span> <span>${this.getSelectedWalletAddress()}</span>
<button-icon-copy <button-icon-copy
title="${translate("walletpage.wchange3")}" title="${translate("walletpage.wchange3")}"
onSuccessMessage="${translate("walletpage.wchange4")}" onSuccessMessage="${translate("walletpage.wchange4")}"
onErrorMessage="${translate("walletpage.wchange39")}" onErrorMessage="${translate("walletpage.wchange39")}"
@ -822,6 +837,9 @@ class MultiWallet extends LitElement {
<div class="book-pos" ?hidden="${this.getSelectedWalletAddress().length < 1}"> <div class="book-pos" ?hidden="${this.getSelectedWalletAddress().length < 1}">
${this.renderAddressbookButton()} ${this.renderAddressbookButton()}
</div> </div>
<div class="unused-pos" ?hidden="${this.getSelectedWalletAddress().length < 1}">
${this.renderUnusedAddressButton()}
</div>
<div class="qrcode-pos" ?hidden="${this.getSelectedWalletAddress().length < 1}"> <div class="qrcode-pos" ?hidden="${this.getSelectedWalletAddress().length < 1}">
<qortal-qrcode-generator data="${this.getSelectedWalletAddress()}" mode="octet" format="html" auto></qortal-qrcode-generator> <qortal-qrcode-generator data="${this.getSelectedWalletAddress()}" mode="octet" format="html" auto></qortal-qrcode-generator>
</div> </div>
@ -1968,6 +1986,171 @@ class MultiWallet extends LitElement {
</mwc-button> </mwc-button>
</mwc-dialog> </mwc-dialog>
<mwc-dialog id="btcUnusedAddressDialog" scrimClickAction="" escapeKeyAction="">
<div class="unused-address-dialog">
<div style="text-align: center;">
<img src="/img/btc.png" width="32" height="32">
<h2>BTC</h2>
<hr />
</div>
<p>
<span style="font-weight: bold;">${this.wallets.get(this._selectedWallet).unusedWalletAddress}</span>
<button-icon-copy
title="${translate("walletpage.wchange3")}"
onSuccessMessage="${translate("walletpage.wchange4")}"
onErrorMessage="${translate("walletpage.wchange39")}"
textToCopy=${this.wallets.get(this._selectedWallet).unusedWalletAddress}
buttonSize="24px"
iconSize="16px"
color="var(--copybutton)"
offsetLeft="4px"
>
</button-icon-copy>
<br />
<span>${translate("walletpage.wchange38")}</span>
</p>
</div>
<mwc-button
slot="primaryAction"
dialogAction="cancel"
class="red"
>
${translate("general.close")}
</mwc-button>
</mwc-dialog>
<mwc-dialog id="ltcUnusedAddressDialog" scrimClickAction="" escapeKeyAction="">
<div class="unused-address-dialog">
<div style="text-align: center;">
<img src="/img/ltc.png" width="32" height="32">
<h2>LTC</h2>
<hr />
</div>
<p>
<span style="font-weight: bold;">${this.wallets.get(this._selectedWallet).unusedWalletAddress}</span>
<button-icon-copy
title="${translate("walletpage.wchange3")}"
onSuccessMessage="${translate("walletpage.wchange4")}"
onErrorMessage="${translate("walletpage.wchange39")}"
textToCopy=${this.wallets.get(this._selectedWallet).unusedWalletAddress}
buttonSize="24px"
iconSize="16px"
color="var(--copybutton)"
offsetLeft="4px"
>
</button-icon-copy>
<br />
<span>${translate("walletpage.wchange38")}</span>
</p>
</div>
<mwc-button
slot="primaryAction"
dialogAction="cancel"
class="red"
>
${translate("general.close")}
</mwc-button>
</mwc-dialog>
<mwc-dialog id="dogeUnusedAddressDialog" scrimClickAction="" escapeKeyAction="">
<div class="unused-address-dialog">
<div style="text-align: center;">
<img src="/img/doge.png" width="32" height="32">
<h2>DOGE</h2>
<hr />
</div>
<p>
<span style="font-weight: bold;">${this.wallets.get(this._selectedWallet).unusedWalletAddress}</span>
<button-icon-copy
title="${translate("walletpage.wchange3")}"
onSuccessMessage="${translate("walletpage.wchange4")}"
onErrorMessage="${translate("walletpage.wchange39")}"
textToCopy=${this.wallets.get(this._selectedWallet).unusedWalletAddress}
buttonSize="24px"
iconSize="16px"
color="var(--copybutton)"
offsetLeft="4px"
>
</button-icon-copy>
<br />
<span>${translate("walletpage.wchange38")}</span>
</p>
</div>
<mwc-button
slot="primaryAction"
dialogAction="cancel"
class="red"
>
${translate("general.close")}
</mwc-button>
</mwc-dialog>
<mwc-dialog id="dgbUnusedAddressDialog" scrimClickAction="" escapeKeyAction="">
<div class="unused-address-dialog">
<div style="text-align: center;">
<img src="/img/dgb.png" width="32" height="32">
<h2>DGB</h2>
<hr />
</div>
<p>
<span style="font-weight: bold;">${this.wallets.get(this._selectedWallet).unusedWalletAddress}</span>
<button-icon-copy
title="${translate("walletpage.wchange3")}"
onSuccessMessage="${translate("walletpage.wchange4")}"
onErrorMessage="${translate("walletpage.wchange39")}"
textToCopy=${this.wallets.get(this._selectedWallet).unusedWalletAddress}
buttonSize="24px"
iconSize="16px"
color="var(--copybutton)"
offsetLeft="4px"
>
</button-icon-copy>
<br />
<span>${translate("walletpage.wchange38")}</span>
</p>
</div>
<mwc-button
slot="primaryAction"
dialogAction="cancel"
class="red"
>
${translate("general.close")}
</mwc-button>
</mwc-dialog>
<mwc-dialog id="rvnUnusedAddressDialog" scrimClickAction="" escapeKeyAction="">
<div class="unused-address-dialog">
<div style="text-align: center;">
<img src="/img/rvn.png" width="32" height="32">
<h2>RVN</h2>
<hr />
</div>
<p>
<span style="font-weight: bold;">${this.wallets.get(this._selectedWallet).unusedWalletAddress}</span>
<button-icon-copy
title="${translate("walletpage.wchange3")}"
onSuccessMessage="${translate("walletpage.wchange4")}"
onErrorMessage="${translate("walletpage.wchange39")}"
textToCopy=${this.wallets.get(this._selectedWallet).unusedWalletAddress}
buttonSize="24px"
iconSize="16px"
color="var(--copybutton)"
offsetLeft="4px"
>
</button-icon-copy>
<br />
<span>${translate("walletpage.wchange38")}</span>
</p>
</div>
<mwc-button
slot="primaryAction"
dialogAction="cancel"
class="red"
>
${translate("general.close")}
</mwc-button>
</mwc-dialog>
<mwc-dialog id="addQortAddressDialog" scrimClickAction="" escapeKeyAction=""> <mwc-dialog id="addQortAddressDialog" scrimClickAction="" escapeKeyAction="">
<div style="text-align:center"> <div style="text-align:center">
<img src="/img/qort.png" width="32" height="32"> <img src="/img/qort.png" width="32" height="32">
@ -3846,7 +4029,7 @@ class MultiWallet extends LitElement {
renderCAB() { renderCAB() {
return html` return html`
<span>${this.selectedTransaction.aTAddress}</span> <span>${this.selectedTransaction.aTAddress}</span>
<button-icon-copy <button-icon-copy
title="${translate("blockpage.bcchange8")}" title="${translate("blockpage.bcchange8")}"
onSuccessMessage="${translate("walletpage.wchange4")}" onSuccessMessage="${translate("walletpage.wchange4")}"
onErrorMessage="${translate("walletpage.wchange39")}" onErrorMessage="${translate("walletpage.wchange39")}"
@ -4115,7 +4298,7 @@ class MultiWallet extends LitElement {
const getName = async (recipient)=> { const getName = async (recipient)=> {
try { try {
const getNames = await parentEpml.request("apiCall", { const getNames = await parentEpml.request("apiCall", {
type: "api", type: "api",
url: `/names/address/${recipient}`, url: `/names/address/${recipient}`,
@ -4501,10 +4684,10 @@ class MultiWallet extends LitElement {
this.balance = this.wallets.get(this._selectedWallet).balance this.balance = this.wallets.get(this._selectedWallet).balance
} }
} }
}) })
const txsQort = await parentEpml.request('apiCall', { const txsQort = await parentEpml.request('apiCall', {
url: `/transactions/search?address=${this.wallets.get('qort').wallet.address}&confirmationStatus=CONFIRMED&reverse=true&txType=PAYMENT&txType=REGISTER_NAME&txType=UPDATE_NAME&txType=SELL_NAME&txType=CANCEL_SELL_NAME&txType=BUY_NAME&txType=CREATE_POLL&txType=VOTE_ON_POLL&txType=ISSUE_ASSET&txType=TRANSFER_ASSET&txType=CREATE_ASSET_ORDER&txType=CANCEL_ASSET_ORDER&txType=MULTI_PAYMENT&txType=DEPLOY_AT&txType=MESSAGE&txType=PUBLICIZE&txType=AIRDROP&txType=AT&txType=CREATE_GROUP&txType=UPDATE_GROUP&txType=ADD_GROUP_ADMIN&txType=REMOVE_GROUP_ADMIN&txType=GROUP_BAN&txType=CANCEL_GROUP_BAN&txType=GROUP_KICK&txType=GROUP_INVITE&txType=CANCEL_GROUP_INVITE&txType=JOIN_GROUP&txType=LEAVE_GROUP&txType=GROUP_APPROVAL&txType=SET_GROUP&txType=UPDATE_ASSET&txType=ACCOUNT_FLAGS&txType=ENABLE_FORGING&txType=REWARD_SHARE&txType=ACCOUNT_LEVEL&txType=TRANSFER_PRIVS&txType=PRESENCE`, url: `/transactions/search?address=${this.wallets.get('qort').wallet.address}&confirmationStatus=CONFIRMED&reverse=true&txType=PAYMENT&txType=REGISTER_NAME&txType=UPDATE_NAME&txType=SELL_NAME&txType=CANCEL_SELL_NAME&txType=BUY_NAME&txType=CREATE_POLL&txType=VOTE_ON_POLL&txType=ISSUE_ASSET&txType=TRANSFER_ASSET&txType=CREATE_ASSET_ORDER&txType=CANCEL_ASSET_ORDER&txType=MULTI_PAYMENT&txType=DEPLOY_AT&txType=MESSAGE&txType=PUBLICIZE&txType=AIRDROP&txType=AT&txType=CREATE_GROUP&txType=UPDATE_GROUP&txType=ADD_GROUP_ADMIN&txType=REMOVE_GROUP_ADMIN&txType=GROUP_BAN&txType=CANCEL_GROUP_BAN&txType=GROUP_KICK&txType=GROUP_INVITE&txType=CANCEL_GROUP_INVITE&txType=JOIN_GROUP&txType=LEAVE_GROUP&txType=GROUP_APPROVAL&txType=SET_GROUP&txType=UPDATE_ASSET&txType=ACCOUNT_FLAGS&txType=ENABLE_FORGING&txType=REWARD_SHARE&txType=ACCOUNT_LEVEL&txType=TRANSFER_PRIVS&txType=PRESENCE`,
}) })
const pendingTxsQort = await parentEpml.request('apiCall', { const pendingTxsQort = await parentEpml.request('apiCall', {
url: `/transactions/unconfirmed?creator=${this.wallets.get('qort').wallet.base58PublicKey}&reverse=true&txType=PAYMENT&txType=REGISTER_NAME&txType=UPDATE_NAME&txType=SELL_NAME&txType=CANCEL_SELL_NAME&txType=BUY_NAME&txType=CREATE_POLL&txType=VOTE_ON_POLL&txType=ISSUE_ASSET&txType=TRANSFER_ASSET&txType=CREATE_ASSET_ORDER&txType=CANCEL_ASSET_ORDER&txType=MULTI_PAYMENT&txType=DEPLOY_AT&txType=MESSAGE&txType=PUBLICIZE&txType=AIRDROP&txType=AT&txType=CREATE_GROUP&txType=UPDATE_GROUP&txType=ADD_GROUP_ADMIN&txType=REMOVE_GROUP_ADMIN&txType=GROUP_BAN&txType=CANCEL_GROUP_BAN&txType=GROUP_KICK&txType=GROUP_INVITE&txType=CANCEL_GROUP_INVITE&txType=JOIN_GROUP&txType=LEAVE_GROUP&txType=GROUP_APPROVAL&txType=SET_GROUP&txType=UPDATE_ASSET&txType=ACCOUNT_FLAGS&txType=ENABLE_FORGING&txType=REWARD_SHARE&txType=ACCOUNT_LEVEL&txType=TRANSFER_PRIVS&txType=PRESENCE`, url: `/transactions/unconfirmed?creator=${this.wallets.get('qort').wallet.base58PublicKey}&reverse=true&txType=PAYMENT&txType=REGISTER_NAME&txType=UPDATE_NAME&txType=SELL_NAME&txType=CANCEL_SELL_NAME&txType=BUY_NAME&txType=CREATE_POLL&txType=VOTE_ON_POLL&txType=ISSUE_ASSET&txType=TRANSFER_ASSET&txType=CREATE_ASSET_ORDER&txType=CANCEL_ASSET_ORDER&txType=MULTI_PAYMENT&txType=DEPLOY_AT&txType=MESSAGE&txType=PUBLICIZE&txType=AIRDROP&txType=AT&txType=CREATE_GROUP&txType=UPDATE_GROUP&txType=ADD_GROUP_ADMIN&txType=REMOVE_GROUP_ADMIN&txType=GROUP_BAN&txType=CANCEL_GROUP_BAN&txType=GROUP_KICK&txType=GROUP_INVITE&txType=CANCEL_GROUP_INVITE&txType=JOIN_GROUP&txType=LEAVE_GROUP&txType=GROUP_APPROVAL&txType=SET_GROUP&txType=UPDATE_ASSET&txType=ACCOUNT_FLAGS&txType=ENABLE_FORGING&txType=REWARD_SHARE&txType=ACCOUNT_LEVEL&txType=TRANSFER_PRIVS&txType=PRESENCE`,
}) })
@ -4638,6 +4821,70 @@ class MultiWallet extends LitElement {
} }
} }
async getUnusedAddress(coin) {
this.wallets.get(this._selectedWallet).unusedWalletAddress = ''
let _url = ``
let _body = null
switch (coin) {
case 'qort':
case 'arrr':
_url = ``
_body = null
break
case 'btc':
case 'ltc':
case 'doge':
case 'dgb':
case 'rvn':
const walletName = `${coin}Wallet`
_url = `/crosschain/${coin}/unusedaddress?apiKey=${this.getApiKey()}`
_body = `${window.parent.reduxStore.getState().app.selectedAddress[walletName].derivedMasterPublicKey}`
break
default:
break
}
if (_body === null) {
this.unusedAddressString = ""
} else {
await parentEpml.request('apiCall', {
url: _url,
method: 'POST',
body: _body,
}).then((res) => {
this.wallets.get(this._selectedWallet).unusedWalletAddress = res
this.unusedAddressString = this.wallets.get(this._selectedWallet).unusedWalletAddress
this.openUnusedAddressDialog(coin)
})
}
}
openUnusedAddressDialog(coin) {
switch (coin) {
case 'qort':
case 'arrr':
break
case 'btc':
this.shadowRoot.querySelector("#btcUnusedAddressDialog").show();
break
case 'ltc':
this.shadowRoot.querySelector("#ltcUnusedAddressDialog").show();
break
case 'doge':
this.shadowRoot.querySelector("#dogeUnusedAddressDialog").show();
break
case 'dgb':
this.shadowRoot.querySelector("#dgbUnusedAddressDialog").show();
break
case 'rvn':
this.shadowRoot.querySelector("#rvnUnusedAddressDialog").show();
break
default:
break
}
}
renderSendButton() { renderSendButton() {
if ( this._selectedWallet === "qort" ) { if ( this._selectedWallet === "qort" ) {
return html`<vaadin-button theme="primary medium" style="width: 100%;" @click=${() => this.openSendQort()}><vaadin-icon icon="vaadin:coin-piles" slot="prefix"></vaadin-icon> ${translate("walletpage.wchange17")} QORT</vaadin-button>` return html`<vaadin-button theme="primary medium" style="width: 100%;" @click=${() => this.openSendQort()}><vaadin-icon icon="vaadin:coin-piles" slot="prefix"></vaadin-icon> ${translate("walletpage.wchange17")} QORT</vaadin-button>`
@ -4678,6 +4925,22 @@ class MultiWallet extends LitElement {
} }
} }
renderUnusedAddressButton() {
switch (this._selectedWallet) {
case "qort":
case "arrr":
return html`<vaadin-button disabled theme="primary medium" style="width: 100%;" @click=${() => this.getUnusedAddress(this._selectedWallet)}><vaadin-icon icon="vaadin:magic" slot="prefix"></vaadin-icon> ${translate("walletpage.wchange58")}</vaadin-button>`
case "btc":
case "ltc":
case "doge":
case "dgb":
case "rvn":
return html`<vaadin-button theme="primary medium" style="width: 100%;" @click=${() => this.getUnusedAddress(this._selectedWallet)}><vaadin-icon icon="vaadin:magic" slot="prefix"></vaadin-icon> ${translate("walletpage.wchange58")}</vaadin-button>`
default:
return html``
}
}
renderExportAddressbookButton() { renderExportAddressbookButton() {
if ( this._selectedWallet === "qort" ) { if ( this._selectedWallet === "qort" ) {
return html`<vaadin-button theme="primary small" style="width: 100%;" @click=${() => this.exportQortAddressbook()}><vaadin-icon icon="vaadin:cloud-download" slot="prefix"></vaadin-icon> ${translate("walletpage.wchange54")}</vaadin-button>` return html`<vaadin-button theme="primary small" style="width: 100%;" @click=${() => this.exportQortAddressbook()}><vaadin-icon icon="vaadin:cloud-download" slot="prefix"></vaadin-icon> ${translate("walletpage.wchange54")}</vaadin-button>`
@ -5556,4 +5819,4 @@ class MultiWallet extends LitElement {
} }
} }
window.customElements.define('multi-wallet', MultiWallet) window.customElements.define('multi-wallet', MultiWallet)