Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): migrate Pera Wallet provider to Pera Connect v2 #179

Merged
merged 7 commits into from
Jun 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Some wallets require additional packages to be installed. The following table li
| Wallet Provider | Package(s) |
| --------------- | ---------------------------------------------------- |
| Defly Wallet | `@blockshake/defly-connect` |
| Pera Wallet | `@perawallet/connect` |
| Pera Wallet | `@perawallet/connect-beta` |
| WalletConnect | `@walletconnect/modal`, `@walletconnect/sign-client` |
| Lute Wallet | `lute-connect` |

Expand All @@ -69,7 +69,10 @@ const walletManager = new WalletManager({
wallets: [
WalletId.DEFLY,
WalletId.EXODUS,
WalletId.PERA,
{
id: WalletId.PERA,
options: { projectId: '<YOUR_PROJECT_ID>' }
},
{
id: WalletId.WALLETCONNECT,
options: { projectId: '<YOUR_PROJECT_ID>' }
Expand All @@ -91,7 +94,7 @@ Each wallet you wish to support must be included in the `wallets` array.

To initialize wallets with default options, pass the wallet ID using the `WalletId` enum. To use custom options, pass an object with the `id` and `options` properties.

> **Note:** WalletConnect's `projectId` option is required. You can obtain a project ID by registering your application at https://cloud.walletconnect.com/
> **Note:** Pera and WalletConnect's `projectId` option is required. You can obtain a project ID by registering your application at https://cloud.walletconnect.com/

#### `network` (optional)

Expand Down
2 changes: 1 addition & 1 deletion examples/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"dependencies": {
"@blockshake/defly-connect": "^1.1.6",
"@perawallet/connect": "^1.3.4",
"@perawallet/connect-beta": "2.0.11",
"@txnlab/use-wallet-react": "workspace:*",
"@walletconnect/modal": "^2.6.2",
"@walletconnect/sign-client": "^2.10.2",
Expand Down
5 changes: 4 additions & 1 deletion examples/nextjs/src/app/providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ const walletManager = new WalletManager({
wallets: [
WalletId.DEFLY,
WalletId.EXODUS,
WalletId.PERA,
{
id: WalletId.PERA,
options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' }
},
{
id: WalletId.WALLETCONNECT,
options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' }
Expand Down
2 changes: 1 addition & 1 deletion examples/nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@blockshake/defly-connect": "^1.1.6",
"@perawallet/connect": "^1.3.4",
"@perawallet/connect-beta": "2.0.11",
"@txnlab/use-wallet": "workspace:*",
"@txnlab/use-wallet-vue": "workspace:*",
"@walletconnect/modal": "^2.6.2",
Expand Down
5 changes: 4 additions & 1 deletion examples/nuxt/plugins/walletManager.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ export default defineNuxtPlugin((nuxtApp) => {
wallets: [
WalletId.DEFLY,
WalletId.EXODUS,
WalletId.PERA,
{
id: WalletId.PERA,
options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' }
},
{
id: WalletId.WALLETCONNECT,
options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' }
Expand Down
2 changes: 1 addition & 1 deletion examples/react-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"@blockshake/defly-connect": "^1.1.6",
"@perawallet/connect": "^1.3.4",
"@perawallet/connect-beta": "2.0.11",
"@txnlab/use-wallet-react": "workspace:*",
"@walletconnect/modal": "^2.6.2",
"@walletconnect/sign-client": "^2.10.2",
Expand Down
5 changes: 4 additions & 1 deletion examples/react-ts/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ const walletManager = new WalletManager({
wallets: [
WalletId.DEFLY,
WalletId.EXODUS,
WalletId.PERA,
{
id: WalletId.PERA,
options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' }
},
{
id: WalletId.WALLETCONNECT,
options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' }
Expand Down
2 changes: 1 addition & 1 deletion examples/solid-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"@blockshake/defly-connect": "^1.1.6",
"@perawallet/connect": "^1.3.4",
"@perawallet/connect-beta": "2.0.11",
"@txnlab/use-wallet-solid": "workspace:*",
"@walletconnect/modal": "^2.6.2",
"@walletconnect/sign-client": "^2.10.2",
Expand Down
5 changes: 4 additions & 1 deletion examples/solid-ts/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ const walletManager = new WalletManager({
wallets: [
WalletId.DEFLY,
WalletId.EXODUS,
WalletId.PERA,
{
id: WalletId.PERA,
options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' }
},
{
id: WalletId.WALLETCONNECT,
options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' }
Expand Down
2 changes: 1 addition & 1 deletion examples/vanilla-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"dependencies": {
"@blockshake/defly-connect": "^1.1.6",
"@perawallet/connect": "^1.3.4",
"@perawallet/connect-beta": "2.0.11",
"@txnlab/use-wallet": "workspace:*",
"@walletconnect/modal": "^2.6.2",
"@walletconnect/sign-client": "^2.10.2",
Expand Down
5 changes: 4 additions & 1 deletion examples/vanilla-ts/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ const walletManager = new WalletManager({
wallets: [
WalletId.DEFLY,
WalletId.EXODUS,
WalletId.PERA,
{
id: WalletId.PERA,
options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' }
},
{
id: WalletId.WALLETCONNECT,
options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' }
Expand Down
3 changes: 1 addition & 2 deletions examples/vue-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
},
"dependencies": {
"@blockshake/defly-connect": "^1.1.6",
"@perawallet/connect": "^1.3.4",
"@txnlab/use-wallet": "workspace:*",
"@perawallet/connect-beta": "2.0.11",
"@txnlab/use-wallet-vue": "workspace:*",
"@walletconnect/modal": "^2.6.2",
"@walletconnect/sign-client": "^2.10.2",
Expand Down
5 changes: 4 additions & 1 deletion examples/vue-ts/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ app.use(WalletManagerPlugin, {
wallets: [
WalletId.DEFLY,
WalletId.EXODUS,
WalletId.PERA,
{
id: WalletId.PERA,
options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' }
},
{
id: WalletId.WALLETCONNECT,
options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' }
Expand Down
4 changes: 2 additions & 2 deletions packages/use-wallet-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
},
"peerDependencies": {
"@blockshake/defly-connect": "^1.1.6",
"@perawallet/connect": "^1.3.4",
"@perawallet/connect-beta": "2.0.11",
"@walletconnect/modal": "^2.6.2",
"@walletconnect/sign-client": "^2.10.2",
"algosdk": "^2.7.0",
Expand All @@ -64,7 +64,7 @@
"@blockshake/defly-connect": {
"optional": true
},
"@perawallet/connect": {
"@perawallet/connect-beta": {
"optional": true
},
"@walletconnect/modal": {
Expand Down
4 changes: 2 additions & 2 deletions packages/use-wallet-solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
},
"peerDependencies": {
"@blockshake/defly-connect": "^1.1.6",
"@perawallet/connect": "^1.3.4",
"@perawallet/connect-beta": "^2.0.11",
"@walletconnect/modal": "^2.6.2",
"@walletconnect/sign-client": "^2.10.2",
"algosdk": "^2.7.0",
Expand All @@ -84,7 +84,7 @@
"@blockshake/defly-connect": {
"optional": true
},
"@perawallet/connect": {
"@perawallet/connect-beta": {
"optional": true
},
"@walletconnect/modal": {
Expand Down
4 changes: 2 additions & 2 deletions packages/use-wallet-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
},
"peerDependencies": {
"@blockshake/defly-connect": "^1.1.6",
"@perawallet/connect": "^1.3.4",
"@perawallet/connect-beta": "^2.0.11",
"@walletconnect/modal": "^2.6.2",
"@walletconnect/sign-client": "^2.10.2",
"algosdk": "^2.7.0",
Expand All @@ -60,7 +60,7 @@
"@blockshake/defly-connect": {
"optional": true
},
"@perawallet/connect": {
"@perawallet/connect-beta": {
"optional": true
},
"@walletconnect/modal": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe('WalletManagerPlugin', () => {
it('installs correctly', () => {
const app = createApp({})
const mockConfig: WalletManagerConfig = {
wallets: [WalletId.DEFLY, WalletId.PERA]
wallets: [WalletId.DEFLY, WalletId.KIBISIS]
}
app.use(WalletManagerPlugin, mockConfig)

Expand Down
6 changes: 3 additions & 3 deletions packages/use-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
"devDependencies": {
"@blockshake/defly-connect": "^1.1.6",
"@perawallet/connect": "^1.3.4",
"@perawallet/connect-beta": "2.0.11",
"@types/node": "^20.6.5",
"@walletconnect/modal": "^2.6.2",
"@walletconnect/modal-core": "^2.6.2",
Expand All @@ -55,7 +55,7 @@
},
"peerDependencies": {
"@blockshake/defly-connect": "^1.1.6",
"@perawallet/connect": "^1.3.4",
"@perawallet/connect-beta": "^2.0.11",
"@walletconnect/modal": "^2.6.2",
"@walletconnect/sign-client": "^2.10.2",
"lute-connect": "^1.2.0"
Expand All @@ -64,7 +64,7 @@
"@blockshake/defly-connect": {
"optional": true
},
"@perawallet/connect": {
"@perawallet/connect-beta": {
"optional": true
},
"@walletconnect/modal": {
Expand Down
Loading
Loading