Skip to content

Commit

Permalink
Release: v2.2.0-beta.8
Browse files Browse the repository at this point in the history
  • Loading branch information
kvhnuke committed Aug 20, 2021
1 parent 4f34918 commit 0ab22fd
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions example/app/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ export default {
.getBalance('0x192627797720b7c5EC7b9FAAeafa41FF49f866e3')
.then(console.log)
.catch(console.error);
this.web3.eth.net.getId().then(console.log);
web3 = this.web3;
this.ethereum.on('accountsChanged', accounts => {
console.log(`accountsChanged User's address is ${accounts[0]}`);
Expand Down Expand Up @@ -497,6 +498,7 @@ export default {
this.ethereum = this.connect.makeWeb3Provider();
this.web3 = new Web3(this.ethereum);
this.web3.eth.getBlockNumber().then(console.log);
this.web3.eth.net.getId().then(console.log);
},
animate() {
this.connect.showNotice();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@myetherwallet/mewconnect-web-client",
"homepage": "https://github.com/myetherwallet/MEWconnect-web-client",
"version": "2.2.0-beta.7",
"version": "2.2.0-beta.8",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/connectProvider/web3Provider/MEWconnect/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class MEWconnectWallet {
tx.data.slice(0, 10) === '0xa9059cbb' ||
tx.data.slice(0, 10) === '0x095ea7b3'
) {
tokenInfo = this.state.network.type.tokens.find(
tokenInfo = this.state.network.tokens.find(
entry => entry.address.toLowerCase() === tx.to.toLowerCase()
);
if (tokenInfo) {
Expand All @@ -116,7 +116,7 @@ class MEWconnectWallet {
this.mewConnect.once('signTx', result => {
this.mewConnect.removeAllListeners('reject');
tx = new Transaction(sanitizeHex(result), {
common: commonGenerator(this.state.network.type)
common: commonGenerator(this.state.network)
});
const signedChainId = calculateChainIdFromV(tx.v);
if (signedChainId !== networkId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default async ({ payload, store, eventHub }, res, next) => {
tx.gasPrice = !tx.gasPrice
? await store.state.web3.eth.getGasPrice()
: tx.gasPrice;
tx.chainId = !tx.chainId ? store.state.network.type.chainID : tx.chainId;
tx.chainId = !tx.chainId ? store.state.network.chainID : tx.chainId;
} catch (e) {
eventHub.emit(EventNames.ERROR_NOTIFY, e);
debugErrors(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default async ({ payload, store, eventHub }, res, next) => {
!tx.gas || new BigNumber(tx.gas).lte(0)
? await store.state.web3.eth.estimateGas(localTx)
: tx.gas;
tx.chainId = !tx.chainId ? store.state.network.type.chainID : tx.chainId;
tx.chainId = !tx.chainId ? store.state.network.chainID : tx.chainId;
tx.gasPrice =
!tx.gasPrice || new BigNumber(tx.gasPrice).lte(0)
? await store.state.web3.eth.getGasPrice()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { toPayload } from '../jsonrpc';

export default async ({ payload, store }, res, next) => {
if (payload.method !== 'net_version') return next();
res(null, toPayload(payload.id, store.state.network.type.chainID));
res(null, toPayload(payload.id, store.state.network.chainID));
};

0 comments on commit 0ab22fd

Please sign in to comment.