diff --git a/package.json b/package.json index 9c9e229c..e2047a45 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "onboard-notify-react", - "version": "0.13.2-0.0.2", + "version": "0.13.2-0.0.3", "dependencies": { "bnc-notify": "^1.9.1", "bnc-notify-staging": "https://github.com/blocknative/notify#develop", diff --git a/src/App.js b/src/App.js index ca745dd6..1f2df723 100644 --- a/src/App.js +++ b/src/App.js @@ -171,13 +171,15 @@ const App = () => { value: 1000000000000000 } - const sendTransaction = () => - signer.sendTransaction(txDetails).then(tx => tx.hash) + const sendTransaction = () => { + return signer.sendTransaction(txDetails).then(tx => tx.hash) + } const gasPrice = () => provider.getGasPrice().then(res => res.toString()) - const estimateGas = () => - provider.estimateGas(txDetails).then(res => res.toString()) + const estimateGas = () => { + return provider.estimateGas(txDetails).then(res => res.toString()) + } const { emitter } = await notify.transaction({ sendTransaction, @@ -203,7 +205,9 @@ const App = () => { emitter.on('txFailed', console.log) } - return onboard && notify ? ( + if (!onboard || !notify) return
Loading...
+ + return (
{ens && ens.name ? ( @@ -530,8 +534,6 @@ const App = () => {
- ) : ( -
Loading...
) } diff --git a/src/networkEnum.js b/src/networkEnum.js index 8bb867f2..31cde2d1 100644 --- a/src/networkEnum.js +++ b/src/networkEnum.js @@ -1,10 +1,14 @@ const networkEnum = Object.freeze({ - 1: 'main', - 3: 'ropsten', - 4: 'rinkeby', - 5: 'goerli', - 42: 'kovan', - 100: 'xdai', - 'localhost': 'localhost' + 1: 'Ethereum Main', + 3: 'Ropsten', + 4: 'Rinkeby', + 5: 'Goerli', + 25: 'Cronos', + 42: 'Kovan', + 56: 'BSC', + 100: 'XDai', + 137: 'Polygon', + 250: 'Fantom', + localhost: 'localhost' }); -export default networkEnum; \ No newline at end of file +export default networkEnum;