Skip to content

Commit

Permalink
fix: Remove unnecessary dependendices
Browse files Browse the repository at this point in the history
  • Loading branch information
mucahit committed Apr 7, 2022
1 parent 8737b9b commit 79fafd8
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 183 deletions.
176 changes: 12 additions & 164 deletions package-lock.json

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

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@perawallet/connect",
"version": "0.0.2",
"version": "0.0.3",
"description": "JavaScript SDK for integrating Pera Wallet to web applications.",
"main": "dist/index.js",
"scripts": {
Expand Down Expand Up @@ -32,15 +32,16 @@
"typescript": "^4.6.3"
},
"dependencies": {
"@hipo/react-ui-toolkit": "^1.0.0-beta",
"@json-rpc-tools/utils": "^1.7.6",
"@walletconnect/client": "^1.7.7",
"algosdk": "^1.15.0",
"buffer": "^6.0.3",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-qr-code": "^2.0.5"
},
"peerDependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"types": "./dist/index.d.ts",
"repository": {
"type": "git",
Expand Down
12 changes: 7 additions & 5 deletions src/PeraWalletConnect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ const peraWalletConnectModalActions = {
close: closePeraWalletConnectModal
};

(async function () {
await assignBridgeURL();
})();

class PeraWalletConnect {
bridge: string;
connector: WalletConnect | null;
Expand All @@ -55,9 +51,15 @@ class PeraWalletConnect {
await this.connector.killSession();
}

let bridgeURL = "";

if (!this.bridge) {
bridgeURL = await assignBridgeURL();
}

// Create Connector instance
this.connector = new WalletConnect({
bridge: this.bridge,
bridge: this.bridge || bridgeURL,
qrcodeModal: peraWalletConnectModalActions
});

Expand Down
Loading

0 comments on commit 79fafd8

Please sign in to comment.