Skip to content
This repository has been archived by the owner on Jun 15, 2024. It is now read-only.

Commit

Permalink
chore: remove MyAlgo provider/support
Browse files Browse the repository at this point in the history
  • Loading branch information
drichar committed Dec 14, 2023
1 parent 1befeec commit 4b2c712
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 197 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ npm install @txnlab/use-wallet-js
Install peer dependencies:

```bash
npm install @blockshake/defly-connect @perawallet/connect @randlabs/myalgo-connect @walletconnect/modal @walletconnect/sign-client @walletconnect/types algosdk
npm install @blockshake/defly-connect @perawallet/connect @walletconnect/modal @walletconnect/sign-client @walletconnect/types algosdk
```

## Configuration
Expand All @@ -69,7 +69,6 @@ const walletManager = new WalletManager({
wallets: [
WalletId.DEFLY,
WalletId.EXODUS,
WalletId.MYALGO,
WalletId.PERA,
{
id: WalletId.WALLETCONNECT,
Expand Down Expand Up @@ -303,7 +302,6 @@ const walletManager = new WalletManager({
wallets: [
WalletId.DEFLY,
WalletId.EXODUS,
WalletId.MYALGO,
WalletId.PERA,
{
id: WalletId.WALLETCONNECT,
Expand Down
Binary file modified bun.lockb
Binary file not shown.
6 changes: 0 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"pera",
"defly",
"exodus",
"myalgo",
"algosdk",
"kmd"
],
Expand All @@ -39,7 +38,6 @@
"peerDependencies": {
"@blockshake/defly-connect": "^1.1.6",
"@perawallet/connect": "^1.3.3",
"@randlabs/myalgo-connect": "^1.4.2",
"@walletconnect/modal": "^2.6.2",
"@walletconnect/sign-client": "^2.10.2"
},
Expand All @@ -50,9 +48,6 @@
"@perawallet/connect": {
"optional": true
},
"@randlabs/myalgo-connect": {
"optional": true
},
"@walletconnect/modal": {
"optional": true
},
Expand All @@ -69,7 +64,6 @@
"@blockshake/defly-connect": "^1.1.6",
"@jest/globals": "^29.7.0",
"@perawallet/connect": "^1.3.3",
"@randlabs/myalgo-connect": "^1.4.2",
"@types/jest": "^29.5.10",
"@types/node": "^20.6.5",
"@types/web": "^0.0.125",
Expand Down
4 changes: 4 additions & 0 deletions src/wallets/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ export class WalletManager {
return [...this._wallets.values()]
}

public getWallet(walletId: WalletId): BaseWallet | undefined {
return this._wallets.get(walletId)
}

public async resumeSessions(): Promise<void> {
const promises = this.wallets.map((wallet) => wallet?.resumeSession())
await Promise.all(promises)
Expand Down
1 change: 0 additions & 1 deletion src/wallets/supported/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export enum WalletId {
EXODUS = 'exodus',
KMD = 'kmd',
MNEMONIC = 'mnemonic',
MYALGO = 'myalgo',
PERA = 'pera',
WALLETCONNECT = 'walletconnect'
}
Expand Down
1 change: 0 additions & 1 deletion src/wallets/supported/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ export * from './defly'
export * from './exodus'
export * from './kmd'
export * from './mnemonic'
export * from './myalgo'
export * from './pera'
export * from './types'
export * from './utils'
Expand Down
179 changes: 0 additions & 179 deletions src/wallets/supported/myalgo.ts

This file was deleted.

5 changes: 0 additions & 5 deletions src/wallets/supported/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { DeflyWallet, type DeflyWalletConnectOptions } from './defly'
import { ExodusWallet, type ExodusOptions } from './exodus'
import { KmdWallet, type KmdOptions } from './kmd'
import { MnemonicWallet, type MnemonicOptions } from './mnemonic'
import { MyAlgoWallet, type MyAlgoConnectOptions } from './myalgo'
import { PeraWallet, type PeraWalletConnectOptions } from './pera'
import { WalletConnect, type WalletConnectOptions } from './walletconnect'

Expand All @@ -13,7 +12,6 @@ export type WalletMap = {
[WalletId.EXODUS]: typeof ExodusWallet
[WalletId.KMD]: typeof KmdWallet
[WalletId.MNEMONIC]: typeof MnemonicWallet
[WalletId.MYALGO]: typeof MyAlgoWallet
[WalletId.PERA]: typeof PeraWallet
[WalletId.WALLETCONNECT]: typeof WalletConnect
}
Expand All @@ -23,7 +21,6 @@ export type WalletOptionsMap = {
[WalletId.EXODUS]: ExodusOptions
[WalletId.KMD]: KmdOptions
[WalletId.MNEMONIC]: MnemonicOptions
[WalletId.MYALGO]: MyAlgoConnectOptions
[WalletId.PERA]: PeraWalletConnectOptions
[WalletId.WALLETCONNECT]: WalletConnectOptions
}
Expand All @@ -33,12 +30,10 @@ export type SupportedWallet =
| WalletIdConfig<WalletId.EXODUS>
| WalletIdConfig<WalletId.KMD>
| WalletIdConfig<WalletId.MNEMONIC>
| WalletIdConfig<WalletId.MYALGO>
| WalletIdConfig<WalletId.PERA>
| WalletIdConfig<WalletId.WALLETCONNECT>
| WalletId.DEFLY
| WalletId.EXODUS
| WalletId.KMD
| WalletId.MNEMONIC
| WalletId.MYALGO
| WalletId.PERA
2 changes: 0 additions & 2 deletions src/wallets/supported/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { DeflyWallet } from './defly'
import { ExodusWallet } from './exodus'
import { KmdWallet } from './kmd'
import { MnemonicWallet } from './mnemonic'
import { MyAlgoWallet } from './myalgo'
import { PeraWallet } from './pera'
import { WalletMap } from './types'
import { WalletConnect } from './walletconnect'
Expand All @@ -14,7 +13,6 @@ export function createWalletMap(): WalletMap {
[WalletId.EXODUS]: ExodusWallet,
[WalletId.KMD]: KmdWallet,
[WalletId.MNEMONIC]: MnemonicWallet,
[WalletId.MYALGO]: MyAlgoWallet,
[WalletId.PERA]: PeraWallet,
[WalletId.WALLETCONNECT]: WalletConnect
}
Expand Down

0 comments on commit 4b2c712

Please sign in to comment.