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: Add Copper Connect wallet #62

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions apps/test-dapp/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
PolkaGate,
SubWallet,
TalismanWallet,
CopperConnectWallet
} from '@talismn/connect-wallets'

export function App() {
Expand All @@ -31,6 +32,7 @@ export function App() {
new EnkryptWallet(),
new PolkadotjsWallet(),
new AlephZeroWallet(),
new CopperConnectWallet(),
]}
triggerComponent={<button>Open Wallets</button>}
/>
Expand Down
14 changes: 14 additions & 0 deletions packages/connect-wallets/src/lib/copper-wallet/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { BaseDotsamaWallet } from '../base-dotsama-wallet'
import logo from './logo.svg'

export class CopperConnectWallet extends BaseDotsamaWallet {
extensionName = 'copperconnect'
title = 'Copper Connect'
installUrl = 'https://chromewebstore.google.com/detail/copper-connect/pkklibkpnflbmahpcnpifnnooicnehnh'
noExtensionMessage =
'You can use any Polkadot compatible wallet but we recommend using Talisman'
logo = {
src: logo,
alt: 'Copper Logo',
}
}
51 changes: 51 additions & 0 deletions packages/connect-wallets/src/lib/copper-wallet/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/connect-wallets/src/lib/wallets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { PolkadotjsWallet } from './polkadotjs-wallet'
import { PolkaGate } from './polkagate-wallet'
import { SubWallet } from './subwallet-wallet'
import { TalismanWallet } from './talisman-wallet'
import { CopperConnectWallet } from './copper-wallet'

// Export wallets as well for one and done usage
export {
Expand All @@ -20,6 +21,7 @@ export {
PolkadotjsWallet,
SubWallet,
TalismanWallet,
CopperConnectWallet
}

// Add new wallets here
Expand All @@ -33,6 +35,7 @@ const supportedWallets = [
new EnkryptWallet(),
new PolkadotjsWallet(),
new AlephZeroWallet(),
new CopperConnectWallet(),
]

export function getWallets(): Wallet[] {
Expand Down