Skip to content

Commit

Permalink
Hotfix/1.17.4 (#778)
Browse files Browse the repository at this point in the history
* fix: portis connector

* update: tick version
  • Loading branch information
arb000r authored Aug 31, 2021
1 parent edf6109 commit f69dec2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
13 changes: 8 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@balancer-labs/frontend-v2",
"version": "1.17.3",
"version": "1.17.4",
"engines": {
"node": "14.x",
"npm": ">=7"
Expand Down Expand Up @@ -29,7 +29,7 @@
"@gnosis.pm/safe-apps-sdk": "^4.0.0",
"@metamask/detect-provider": "^1.2.0",
"@popperjs/core": "^2.9.2",
"@portis/web3": "^3.0.3",
"@portis/web3": "^3.0.10",
"@sentry/browser": "^6.3.2",
"@sentry/tracing": "^6.3.2",
"@tailwindcss/postcss7-compat": "^2.0.4",
Expand Down Expand Up @@ -104,4 +104,4 @@
},
"license": "MIT",
"repository": "balancer-labs/frontend-v2"
}
}
10 changes: 4 additions & 6 deletions src/services/web3/connectors/portis/portis.connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,17 @@ export class PortisConnector extends Connector {
configService.env.PORTIS_DAPP_ID,
configService.network.network
) as any;

const provider = portis.provider;

if (provider) {
this.provider = provider;
this.active.value = true;

try {
if (provider.request) {
const accounts = await provider.request({
method: 'eth_requestAccounts'
});

const chainId = await provider.request({ method: 'eth_chainId' });
if (provider.send) {
const accounts = await provider.send('eth_accounts');
const chainId = await provider.send('eth_chainId');
this.handleChainChanged(chainId);
this.handleAccountsChanged(accounts);
}
Expand Down

4 comments on commit f69dec2

@vercel
Copy link

@vercel vercel bot commented on f69dec2 Aug 31, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

app – ./

app-git-master-balancer.vercel.app
app-balancer.vercel.app
app.balancer.fi
pm2.vercel.app

@vercel
Copy link

@vercel vercel bot commented on f69dec2 Aug 31, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on f69dec2 Aug 31, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on f69dec2 Aug 31, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.