Browse Source

added fee to modal

pull/206/head
PhilReact 1 year ago
parent
commit
f7fe4d314e
  1. 8
      crypto/api/transactions/polls/CreatePollTransaction.js
  2. 8
      crypto/api/transactions/polls/VoteOnPollTransaction.js
  3. 6
      plugins/plugins/core/qdn/browser/browser.src.js

8
crypto/api/transactions/polls/CreatePollTransaction.js

@ -24,6 +24,9 @@ export default class CreatePollTransaction extends TransactionBase {
<span style="color: #000;">${this._pollOptions.join(', ')}</span> <span style="color: #000;">${this._pollOptions.join(', ')}</span>
</div> </div>
${this._votedialog6} ${this._votedialog6}
<div style="margin-top: 10px; font-weight: bold">
${this._feeDialog}: ${this._feeDisplay}
</div>
` `
} }
@ -33,6 +36,10 @@ export default class CreatePollTransaction extends TransactionBase {
this._options.push({ length: optionLength, bytes: optionBytes }); this._options.push({ length: optionLength, bytes: optionBytes });
} }
set feeDialog(feeDialog){
this._feeDialog = feeDialog
}
set votedialog3(votedialog3) { set votedialog3(votedialog3) {
this._votedialog3 = votedialog3 this._votedialog3 = votedialog3
} }
@ -48,6 +55,7 @@ export default class CreatePollTransaction extends TransactionBase {
} }
set fee(fee) { set fee(fee) {
this._feeDisplay = fee
this._fee = fee * QORT_DECIMALS this._fee = fee * QORT_DECIMALS
this._feeBytes = this.constructor.utils.int64ToBytes(this._fee) this._feeBytes = this.constructor.utils.int64ToBytes(this._fee)
} }

8
crypto/api/transactions/polls/VoteOnPollTransaction.js

@ -15,9 +15,16 @@ export default class VoteOnPollTransaction extends TransactionBase {
<span style="color: #000;">${this._rPollName}</span> <span style="color: #000;">${this._rPollName}</span>
</div> </div>
${this._votedialog2} ${this._votedialog2}
<div style="margin-top: 10px; font-weight: bold">
${this._feeDialog}: ${this._feeDisplay}
</div>
` `
} }
set feeDialog(feeDialog){
this._feeDialog = feeDialog
}
set votedialog1(votedialog1) { set votedialog1(votedialog1) {
this._votedialog1 = votedialog1 this._votedialog1 = votedialog1
} }
@ -27,6 +34,7 @@ export default class VoteOnPollTransaction extends TransactionBase {
} }
set fee(fee) { set fee(fee) {
this._feeDisplay = fee
this._fee = fee * QORT_DECIMALS this._fee = fee * QORT_DECIMALS
this._feeBytes = this.constructor.utils.int64ToBytes(this._fee) this._feeBytes = this.constructor.utils.int64ToBytes(this._fee)
} }

6
plugins/plugins/core/qdn/browser/browser.src.js

@ -657,6 +657,7 @@ class WebBrowser extends LitElement {
const makeTransactionRequest = async (lastRef) => { const makeTransactionRequest = async (lastRef) => {
let votedialog1 = get("transactions.votedialog1") let votedialog1 = get("transactions.votedialog1")
let votedialog2 = get("transactions.votedialog2") let votedialog2 = get("transactions.votedialog2")
let feeDialog = get("walletpage.wchange12")
let myTxnrequest = await parentEpml.request('transaction', { let myTxnrequest = await parentEpml.request('transaction', {
type: 9, type: 9,
@ -668,7 +669,8 @@ class WebBrowser extends LitElement {
rOptionIndex: optionIndex, rOptionIndex: optionIndex,
lastReference: lastRef, lastReference: lastRef,
votedialog1: votedialog1, votedialog1: votedialog1,
votedialog2: votedialog2 votedialog2: votedialog2,
feeDialog
}, },
apiVersion: 2 apiVersion: 2
}) })
@ -712,6 +714,7 @@ class WebBrowser extends LitElement {
let votedialog4 = get("transactions.votedialog4") let votedialog4 = get("transactions.votedialog4")
let votedialog5 = get("transactions.votedialog5") let votedialog5 = get("transactions.votedialog5")
let votedialog6 = get("transactions.votedialog6") let votedialog6 = get("transactions.votedialog6")
let feeDialog = get("walletpage.wchange12")
let myTxnrequest = await parentEpml.request('transaction', { let myTxnrequest = await parentEpml.request('transaction', {
type: 8, type: 8,
@ -727,6 +730,7 @@ class WebBrowser extends LitElement {
votedialog4: votedialog4, votedialog4: votedialog4,
votedialog5: votedialog5, votedialog5: votedialog5,
votedialog6: votedialog6, votedialog6: votedialog6,
feeDialog
}, },
apiVersion: 2 apiVersion: 2
}) })

Loading…
Cancel
Save