fix: transaction dialog not showing up due to missing slot

This commit is contained in:
Richard Ramos 2020-11-24 13:15:59 -04:00 committed by RichΛrd
parent 8b74141b99
commit d2ec9854ad
2 changed files with 8 additions and 1 deletions

View File

@ -81,3 +81,10 @@ QtObject:
proc urlFromUserInput*(self: UtilsView, input: string): string {.slot.} =
result = url_fromUserInput(input)
proc wei2Eth*(self: UtilsView, wei: string, decimals: int): string {.slot.} =
var weiValue = wei
if(weiValue.startsWith("0x")):
weiValue = fromHex(Stuint[256], weiValue).toString()
return status_utils.wei2Eth(weiValue, decimals)

View File

@ -129,7 +129,7 @@ Rectangle {
request.payload.method === "eth_sendTransaction") {
walletModel.setFocusedAccountByAddress(request.payload.params[0].from)
var acc = walletModel.focusedAccount
const value = utilsModel.wei2Token(request.payload.params[0].value, 18)
const value = utilsModel.wei2Eth(request.payload.params[0].value, 18);
const sendDialog = sendTransactionModalComponent.createObject(browserWindow, {
trxData:request.payload.params[0].data,