-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from nabla-studio/DavideSegullo/feat-add_wallets
Feat: add wallets
- Loading branch information
Showing
22 changed files
with
140 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import type { CosmosWallet } from '../types'; | ||
|
||
export const okxextension: CosmosWallet = { | ||
$schema: '../../wallet.schema.json', | ||
wallet_name: 'okxextension', | ||
pretty_name: 'OKX', | ||
connection_type: 'browser_extension', | ||
website: 'https://www.okx.com/', | ||
git_repo: 'https://github.com/okx', | ||
supported_chains: ['cosmoshub', 'osmosis'], | ||
features: [], | ||
platforms: [ | ||
{ | ||
device: 'desktop', | ||
type: 'extension', | ||
platform: 'chrome', | ||
install_link: | ||
'https://chrome.google.com/webstore/detail/okx-wallet/mcohilncbfahbmgdjkbpemcciiolgcge', | ||
}, | ||
{ | ||
device: 'desktop', | ||
type: 'extension', | ||
platform: 'firefox', | ||
install_link: | ||
'https://addons.mozilla.org/zh-CN/firefox/addon/okexwallet/', | ||
}, | ||
], | ||
images: [ | ||
{ | ||
png: 'https://raw.githubusercontent.com/cosmos/wallet-registry/main/wallets/okxextension/images/logo.png', | ||
theme: { | ||
primary_color_hex: '#000000', | ||
circle: false, | ||
dark_mode: true, | ||
}, | ||
layout: 'logomark', | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule wallet-registry
updated
11 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { WCWallet } from '@quirks/core'; | ||
import { cosmostationWalletMobileConnectOptions } from './registry'; | ||
|
||
const cosmostationMobile = new WCWallet(cosmostationWalletMobileConnectOptions); | ||
|
||
export { cosmostationMobile }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { WalletConnectionTypes, type WalletOptions } from '@quirks/core'; | ||
import { cosmostationmobile } from '@nabla-studio/wallet-registry'; | ||
|
||
export const cosmostationWalletMobileConnectOptions: WalletOptions = { | ||
...cosmostationmobile, | ||
connectionType: WalletConnectionTypes.WALLET_CONNECT, | ||
events: { | ||
keystorechange: 'accountsChanged', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { assertIsDefined } from '@quirks/core'; | ||
import { KeplrWalletExtension } from '../keplr/extension'; | ||
import { OKX } from './types'; | ||
|
||
export class OKXWalletExtension extends KeplrWalletExtension<OKX> { | ||
override async disable(): Promise<void> { | ||
assertIsDefined(this.client); | ||
|
||
return this.client.disconnect(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { OKXWalletExtension } from './extension'; | ||
import { okxExtensionOptions } from './registry'; | ||
|
||
const okxExtension = new OKXWalletExtension(okxExtensionOptions); | ||
|
||
export { okxExtension }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { WalletConnectionTypes, type WalletOptions } from '@quirks/core'; | ||
import { okxextension } from '@nabla-studio/wallet-registry'; | ||
|
||
export const okxExtensionOptions: WalletOptions = { | ||
...okxextension, | ||
connectionType: WalletConnectionTypes.EXTENSION, | ||
windowKey: 'okxwallet.keplr', | ||
events: { | ||
keystorechange: 'okxwallet_keystorechange', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import type { Keplr } from '@keplr-wallet/types'; | ||
|
||
export interface OKX extends Keplr { | ||
disconnect: () => Promise<void>; | ||
} |