Skip to content

Commit

Permalink
rm bbn provider
Browse files Browse the repository at this point in the history
  • Loading branch information
gbarkhatov committed Dec 17, 2024
1 parent a184cfa commit e0eb4b7
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 61 deletions.
45 changes: 0 additions & 45 deletions src/core/wallets/bbn/BBNProvider.ts

This file was deleted.

5 changes: 2 additions & 3 deletions src/core/wallets/bbn/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { BBNConfig, ChainMetadata } from "@/core/types";
import { BBNConfig, ChainMetadata, IBBNProvider } from "@/core/types";

import { BBNProvider } from "./BBNProvider";
import icon from "./babylon.jpeg";
import injectable from "./injectable";
import keplr from "./keplr";

const metadata: ChainMetadata<"BBN", BBNProvider, BBNConfig> = {
const metadata: ChainMetadata<"BBN", IBBNProvider, BBNConfig> = {
chain: "BBN",
name: "Babylon Chain",
icon,
Expand Down
6 changes: 2 additions & 4 deletions src/core/wallets/bbn/injectable/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { Network, type BBNConfig, type WalletMetadata } from "@/core/types";
import { IBBNProvider, Network, type BBNConfig, type WalletMetadata } from "@/core/types";

import { BBNProvider } from "../BBNProvider";

const metadata: WalletMetadata<BBNProvider, BBNConfig> = {
const metadata: WalletMetadata<IBBNProvider, BBNConfig> = {
id: "injectable",
name: (wallet) => wallet.getWalletProviderName?.(),
icon: (wallet) => wallet.getWalletProviderIcon?.(),
Expand Down
6 changes: 2 additions & 4 deletions src/core/wallets/bbn/keplr/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { Network, type BBNConfig, type WalletMetadata } from "@/core/types";

import type { BBNProvider } from "../BBNProvider";
import { IBBNProvider, Network, type BBNConfig, type WalletMetadata } from "@/core/types";

import logo from "./logo.svg";
import { KeplrProvider } from "./provider";

const metadata: WalletMetadata<BBNProvider, BBNConfig> = {
const metadata: WalletMetadata<IBBNProvider, BBNConfig> = {
id: "keplr",
name: "Keplr",
icon: logo,
Expand Down
6 changes: 2 additions & 4 deletions src/core/wallets/bbn/keplr/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import { Window as KeplrWindow } from "@keplr-wallet/types";
import { OfflineAminoSigner, OfflineDirectSigner } from "@keplr-wallet/types/src/cosmjs";
import { Buffer } from "buffer";

import { BBNConfig, WalletInfo } from "@/core/types";
import { BBNProvider } from "@/core/wallets/bbn/BBNProvider";
import { BBNConfig, IBBNProvider, WalletInfo } from "@/core/types";

import logo from "./logo.svg";

Expand All @@ -12,7 +11,7 @@ declare global {
interface Window extends KeplrWindow {}
}

export class KeplrProvider extends BBNProvider {
export class KeplrProvider implements IBBNProvider {
private walletInfo: WalletInfo | undefined;
private chainId: string | undefined;
private rpc: string | undefined;
Expand All @@ -22,7 +21,6 @@ export class KeplrProvider extends BBNProvider {
private keplr: Window["keplr"],
config: BBNConfig,
) {
super();
if (!keplr) {
throw new Error("Keplr extension not found");
}
Expand Down
1 change: 0 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ export * from "@/context/State.context";

export { createExternalWallet } from "@/core";
export * from "@/core/types";
export * from "@/core/wallets/bbn/BBNProvider";

0 comments on commit e0eb4b7

Please sign in to comment.