Skip to content

Commit

Permalink
Merge pull request #99 from perawallet/next-release
Browse files Browse the repository at this point in the history
  • Loading branch information
mucahit authored Jan 9, 2023
2 parents b2bed93 + 2ccdedf commit 3730e99
Show file tree
Hide file tree
Showing 27 changed files with 493 additions and 3,746 deletions.
25 changes: 5 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,10 @@ try {
## Options
| option | default | value | |
| ------------------------ | --------- | ------------------------------------- | -------- |
| `network` | `mainnet` | `dev`, `testnet`, `mainnet` | optional |
| `chainId` | `4160` | `416001`, `416002`, `416003` , `4160` | optional |
| `shouldShowSignTxnToast` | `true` | `boolean` | optional |
#### **`network`**
Determines which Web Wallet URL is to be used. Most of the time, you don't need to provide it. If you specifically want to use the Testnet version of Web Wallet for development purposes, simply provide `network: testnet` to the `PeraWalletConnect` constructor.
| option | default | value | |
| ------------------------ | ------- | ------------------------------------- | -------- |
| `chainId` | `4160` | `416001`, `416002`, `416003` , `4160` | optional |
| `shouldShowSignTxnToast` | `true` | `boolean` | optional |
#### **`chainId`**
Expand All @@ -120,18 +115,8 @@ It's enabled by default but in some cases, you may not need the toast message (e
#### `PeraWalletConnect.connect(): Promise<string[]>`
| option | default | value | |
| --------- | --------- | --------------------------- | -------- |
| `network` | `mainnet` | `dev`, `testnet`, `mainnet` | optional |
Starts the initial connection flow and returns the array of account addresses.
`network` param of the `connect` method overrides the initial `network` on the constructor.
```javascript
PeraWalletConnect.connect({network: "testnet"}); //optional
```
#### `PeraWalletConnect.reconnectSession(): Promise<string[]>`
Reconnects to the wallet if there is any active connection and returns the array of account addresses.
Expand All @@ -154,7 +139,7 @@ Starts the sign process and returns the signed transaction in `Uint8Array`
## Customizing Style
You can override the z-index using the `.pera-wallet-connect-modal` class so that the modal does not conflict with another component on your application.
You can override the z-index using the `.pera-wallet-modal` class so that the modal does not conflict with another component on your application.
```scss
.pera-wallet-modal {
Expand Down
75 changes: 15 additions & 60 deletions package-lock.json

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

9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.0.7",
"version": "1.1.0",
"name": "@perawallet/connect",
"description": "JavaScript SDK for integrating Pera Wallet to web applications.",
"main": "dist/index.js",
Expand Down Expand Up @@ -30,13 +30,12 @@
"typescript": "^4.6.3"
},
"dependencies": {
"@json-rpc-tools/utils": "^1.7.6",
"@evanhahn/lottie-web-light": "5.8.1",
"@walletconnect/client": "^1.8.0",
"@walletconnect/types": "^1.8.0",
"bowser": "^2.11.0",
"bowser": "2.11.0",
"buffer": "^6.0.3",
"lottie-web": "^5.9.6",
"qr-code-styling": "^1.6.0-rc.1"
"qr-code-styling": "1.6.0-rc.1"
},
"peerDependencies": {
"algosdk": "^1.23.2"
Expand Down
6 changes: 2 additions & 4 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,15 @@ export default [
"@walletconnect/client": "WalletConnect",
algosdk: "algosdk",
bowser: "bowser",
"@json-rpc-tools/utils/dist/cjs/format": "format",
"qr-code-styling": "QRCodeStyling",
"lottie-web": "lottie"
"@evanhahn/lottie-web-light": "lottie"
}
},
external: [
"@walletconnect/client",
"@walletconnect/types",
"@json-rpc-tools/utils/dist/cjs/format",
"algosdk",
"lottie-web",
"@evanhahn/lottie-web-light",
"bowser",
"qr-code-styling",
"bufferutil",
Expand Down
Loading

0 comments on commit 3730e99

Please sign in to comment.