Merge pull request #1974 from ethereum/yann300-patch-34

Fix error message
pull/3094/head
yann300 6 years ago committed by GitHub
commit ab8f508aba
  1. 4
      src/app/tabs/runTab/model/settings.js
  2. 5
      src/app/ui/tooltip.js

@ -93,7 +93,7 @@ class Settings {
const hashedMsg = executionContext.web3().sha3(message)
try {
executionContext.web3().eth.sign(account, hashedMsg, (error, signedData) => {
cb(error, hashedMsg, signedData)
cb(error.message, hashedMsg, signedData)
})
} catch (e) {
cb(e.message)
@ -105,7 +105,7 @@ class Settings {
try {
var personal = new Personal(executionContext.web3().currentProvider)
personal.sign(hashedMsg, account, passphrase, (error, signedData) => {
cb(error, hashedMsg, signedData)
cb(error.message, hashedMsg, signedData)
})
} catch (e) {
cb(e.message)

@ -1,5 +1,6 @@
var yo = require('yo-yo')
var css = require('./styles/tooltip-styles')
var modal = require('./modal-dialog-custom')
/**
* Open a tooltip
@ -25,9 +26,11 @@ class Toaster {
opts = defaultOptions(opts)
return new Promise((resolve, reject) => {
const shortTooltipText = tooltipText.length > 201 ? tooltipText.substring(0, 200) + '...' : tooltipText
this.tooltip = yo`
<div class="${css.tooltip} bg-secondary" onmouseenter=${() => { over() }} onmouseleave=${() => { out() }}>
<span>${tooltipText}</span>
<span>${shortTooltipText}<button class="btn btn-secondary btn-sm" onclick=${() => { modal.alert(tooltipText) }}>show full message</button></span>
${action}
</div>`
let timeOut = () => {

Loading…
Cancel
Save