diff --git a/qortal-ui-crypto/api/transactions/PaymentTransaction.js b/qortal-ui-crypto/api/transactions/PaymentTransaction.js index 54de72c3..655ac285 100644 --- a/qortal-ui-crypto/api/transactions/PaymentTransaction.js +++ b/qortal-ui-crypto/api/transactions/PaymentTransaction.js @@ -34,7 +34,7 @@ export default class PaymentTransaction extends TransactionBase { set dialogamount(dialogamount) { this._dialogamount = dialogamount } - + set amount(amount) { this._amount = Math.round(amount * store.getState().config.coin.decimals) this._amountBytes = this.constructor.utils.int64ToBytes(this._amount) @@ -55,9 +55,21 @@ export default class PaymentTransaction extends TransactionBase { return html`
${this._dialogto} | -${Base58.encode(this._recipient)} | +${this._dialogto}: | +
---|---|---|
${this.dialogAddress} ${' '}- | +${Base58.encode(this._recipient)} | + +|
${this.dialogName} ${' '}- | +${this.recipientName} | +|
${this._dialogamount} | ${this._amount / conf.coin.decimals} ${conf.coin.symbol} | diff --git a/qortal-ui-plugins/plugins/core/wallet/wallet-app.src.js b/qortal-ui-plugins/plugins/core/wallet/wallet-app.src.js index 00642144..2297ea26 100644 --- a/qortal-ui-plugins/plugins/core/wallet/wallet-app.src.js +++ b/qortal-ui-plugins/plugins/core/wallet/wallet-app.src.js @@ -3954,22 +3954,44 @@ class MultiWallet extends LitElement { } } + const getName = async (recipient)=> { + try { + + const getNames = await parentEpml.request("apiCall", { + type: "api", + url: `/names/address/${recipient}`, + }) + if(getNames?.length > 0 ){ + return getNames[0].name + } else { + return '' + } + } catch (error) { + return "" + } + } + const makeTransactionRequest = async (receiver, lastRef) => { let myReceiver = receiver let mylastRef = lastRef let dialogamount = get("transactions.amount") + let dialogAddress = get("login.address") + let dialogName = get("login.name") let dialogto = get("transactions.to") - + let recipientName = await getName(myReceiver) let myTxnrequest = await parentEpml.request('transaction', { type: 2, nonce: this.wallets.get(this._selectedWallet).wallet.nonce, params: { recipient: myReceiver, + recipientName: recipientName, amount: amount, lastReference: mylastRef, fee: 0.001, dialogamount: dialogamount, dialogto: dialogto, + dialogAddress, + dialogName }, }) return myTxnrequest