Skip to content

Commit

Permalink
feat(wallets): add Biatec Wallet (#255)
Browse files Browse the repository at this point in the history
* Biatec Wallet to UseWallet

* Update logo

* fix import

* prettier:fix
  • Loading branch information
scholtz authored Sep 24, 2024
1 parent fa55713 commit c1e8849
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/nextjs/src/app/providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ const walletManager = new WalletManager({
id: WalletId.WALLETCONNECT,
options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' }
},
{
id: WalletId.BIATEC,
options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' }
},
WalletId.KMD,
WalletId.KIBISIS,
{
Expand Down
4 changes: 4 additions & 0 deletions examples/nuxt/plugins/walletManager.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ export default defineNuxtPlugin((nuxtApp) => {
id: WalletId.WALLETCONNECT,
options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' }
},
{
id: WalletId.BIATEC,
options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' }
},
WalletId.KMD,
WalletId.KIBISIS,
{
Expand Down
4 changes: 4 additions & 0 deletions examples/react-ts/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ const walletManager = new WalletManager({
id: WalletId.WALLETCONNECT,
options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' }
},
{
id: WalletId.BIATEC,
options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' }
},
WalletId.KMD,
WalletId.KIBISIS,
{
Expand Down
4 changes: 4 additions & 0 deletions examples/solid-ts/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ const walletManager = new WalletManager({
id: WalletId.WALLETCONNECT,
options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' }
},
{
id: WalletId.BIATEC,
options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' }
},
WalletId.KMD,
WalletId.KIBISIS,
{
Expand Down
4 changes: 4 additions & 0 deletions examples/vanilla-ts/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ const walletManager = new WalletManager({
id: WalletId.WALLETCONNECT,
options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' }
},
{
id: WalletId.BIATEC,
options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' }
},
WalletId.KMD,
WalletId.KIBISIS,
{
Expand Down
4 changes: 4 additions & 0 deletions examples/vue-ts/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ app.use(WalletManagerPlugin, {
id: WalletId.WALLETCONNECT,
options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' }
},
{
id: WalletId.BIATEC,
options: { projectId: 'fcfde0713d43baa0d23be0773c80a72b' }
},
WalletId.KMD,
WalletId.KIBISIS,
{
Expand Down
2 changes: 2 additions & 0 deletions packages/use-wallet/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import algosdk from 'algosdk'
import { WalletId, type JsonRpcRequest, type WalletAccount, type WalletMap } from './wallets/types'
import { BiatecWallet } from './wallets/biatec'
import { CustomWallet } from './wallets/custom'
import { DeflyWallet } from './wallets/defly'
import { ExodusWallet } from './wallets/exodus'
Expand All @@ -14,6 +15,7 @@ import { WalletConnect } from './wallets/walletconnect'

export function createWalletMap(): WalletMap {
return {
[WalletId.BIATEC]: BiatecWallet,
[WalletId.CUSTOM]: CustomWallet,
[WalletId.DEFLY]: DeflyWallet,
[WalletId.EXODUS]: ExodusWallet,
Expand Down
12 changes: 12 additions & 0 deletions packages/use-wallet/src/wallets/biatec.ts

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions packages/use-wallet/src/wallets/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ import {
type PeraWalletConnectOptions as PeraWalletConnectBetaOptions
} from './pera2'
import { WalletConnect, type WalletConnectOptions } from './walletconnect'
import { BiatecWallet } from './biatec'
import type { Store } from '@tanstack/store'
import type algosdk from 'algosdk'
import type { State } from 'src/store'

export enum WalletId {
BIATEC = 'biatec',
DEFLY = 'defly',
CUSTOM = 'custom',
EXODUS = 'exodus',
Expand All @@ -31,6 +33,7 @@ export enum WalletId {
}

export type WalletMap = {
[WalletId.BIATEC]: typeof BiatecWallet
[WalletId.CUSTOM]: typeof CustomWallet
[WalletId.DEFLY]: typeof DeflyWallet
[WalletId.EXODUS]: typeof ExodusWallet
Expand All @@ -45,6 +48,7 @@ export type WalletMap = {
}

export type WalletOptionsMap = {
[WalletId.BIATEC]: WalletConnectOptions
[WalletId.CUSTOM]: CustomWalletOptions
[WalletId.DEFLY]: DeflyWalletConnectOptions
[WalletId.EXODUS]: ExodusOptions
Expand Down

0 comments on commit c1e8849

Please sign in to comment.