Skip to content

Commit

Permalink
feat(algorand): remove unsupported wallets
Browse files Browse the repository at this point in the history
  • Loading branch information
envin3 committed Mar 12, 2024
1 parent b475196 commit 85ac83c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 132 deletions.
5 changes: 5 additions & 0 deletions .changeset/curvy-starfishes-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'ptokens-dapp-v2': minor
---

Update Algorand explorer and supported wallets
45 changes: 0 additions & 45 deletions src/lib/algoWalletModal/connectors/algo-signer.js

This file was deleted.

40 changes: 0 additions & 40 deletions src/lib/algoWalletModal/connectors/my-algo-wallet.js

This file was deleted.

44 changes: 4 additions & 40 deletions src/lib/algoWalletModal/index.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import EventEmitter from 'eventemitter3'
import * as React from 'react'
import * as ReactDOM from 'react-dom'

import Modal from '../eosConnect/components/Modal'
import EventEmitter from 'eventemitter3'
import connectToWalletConnect from './connectors/wallet-connect'
import connectToAlgoSigner from './connectors/algo-signer'
import connectToMyAlgoWallet from './connectors/my-algo-wallet'
import connectToPeraWallet from './connectors/pera-wallet'

import connectToDeflyWallet from './connectors/defly-wallet'
import connectToPeraWallet from './connectors/pera-wallet'

const INITIAL_STATE = { show: false }

Expand Down Expand Up @@ -46,28 +45,6 @@ class AlgoWalletModal extends EventEmitter {
setConfigs = ({ dappName, providerOptions: { algoSigner, walletConnect, myAlgoWallet } }) => {
this.userOptions = []

this.userOptions.push({
name: 'AlgoSigner',
logo: './assets/jpeg/algosigner.jpeg',
description: 'Connect to AlgoSigner',
themeColors: this.themeColors,
onClick: async () => {
this._call.resolve(await connectToAlgoSigner())
await this.toogleModal()
},
})

this.userOptions.push({
name: 'MyAlgoWallet',
logo: './assets/png/myalgo-logo.png',
description: 'Connect to MyAlgoWallet',
themeColors: this.themeColors,
onClick: async () => {
this._call.resolve(await connectToMyAlgoWallet(walletConnect))
await this.toogleModal()
},
})

this.userOptions.push({
name: 'Pera Wallet',
logo: './assets/png/pera-wallet-logo.png',
Expand All @@ -90,19 +67,6 @@ class AlgoWalletModal extends EventEmitter {
},
})

if (walletConnect) {
this.userOptions.push({
name: 'WalletConnect',
logo: './assets/svg/wallet-connect.svg',
description: 'Scan with WalletConnect to connect',
themeColors: this.themeColors,
onClick: async () => {
this._call.resolve(await connectToWalletConnect(walletConnect))
await this.toogleModal()
},
})
}

this.renderModal()
}

Expand Down
9 changes: 2 additions & 7 deletions src/store/wallets/algorand/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ import {
WALLET_ALGORAND_DISCONNECTED,
WALLET_ALGORAND_ACCOUNT_CHANGED,
} from '../../../constants'

import settings from '../../../settings'
import AlgoWalletModal from '../../../lib/algoWalletModal'
import settings from '../../../settings'
import { getWeb3ModalTheme } from '../../../theme/web3-modal'
import { getTheme } from '../../pages/pages.selectors'
import { getWalletProviderByBlockchain } from '../wallets.selectors'
Expand All @@ -18,11 +17,7 @@ const connectWithAlgorandWallet = async (_dispatch) => {
const algoWalletModal = new AlgoWalletModal({
dappName: settings.dappName,
theme: getWeb3ModalTheme(getTheme()),
providerOptions: {
walletConnect: {
bridge: 'https://bridge.walletconnect.org',
},
},
providerOptions: {},
})

try {
Expand Down

0 comments on commit 85ac83c

Please sign in to comment.