fix(dapps) fail to process a transaction if missing usual fields
Updates: #15189
This commit is contained in:
parent
dbd96133a5
commit
06184e4d95
|
@ -99,7 +99,7 @@ Item {
|
|||
})
|
||||
}
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: !!text ? 400 : undefined
|
||||
Layout.preferredHeight: !!text ? 400 : -1
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
|
|
@ -49,15 +49,15 @@ QObject {
|
|||
|
||||
// Strip leading zeros from numbers as expected by status-go
|
||||
function prepareTxForStatusGo(txObj) {
|
||||
return {
|
||||
data: txObj.data,
|
||||
from: txObj.from,
|
||||
gasLimit: stripLeadingZeros(txObj.gasLimit),
|
||||
gasPrice: stripLeadingZeros(txObj.gasPrice),
|
||||
nonce: stripLeadingZeros(txObj.nonce),
|
||||
to: txObj.to,
|
||||
value: stripLeadingZeros(txObj.value)
|
||||
}
|
||||
let tx = {}
|
||||
if (txObj.data) { tx.data = txObj.data }
|
||||
if (txObj.from) { tx.from = txObj.from }
|
||||
if (txObj.gasLimit) { tx.gasLimit = stripLeadingZeros(txObj.gasLimit) }
|
||||
if (txObj.gasPrice) { tx.gasPrice = stripLeadingZeros(txObj.gasPrice) }
|
||||
if (txObj.nonce) { tx.nonce = stripLeadingZeros(txObj.nonce) }
|
||||
if (txObj.to) { tx.to = txObj.to }
|
||||
if (txObj.value) { tx.value = stripLeadingZeros(txObj.value) }
|
||||
return tx
|
||||
}
|
||||
// Returns the hex encoded signature of the transaction or empty string if error
|
||||
function signTransaction(topic, id, address, chainId, password, txObj) {
|
||||
|
|
Loading…
Reference in New Issue