Skip to content

Commit

Permalink
fix: revert transfering Provider type
Browse files Browse the repository at this point in the history
  • Loading branch information
samobasquiat committed Nov 29, 2023
1 parent d3161e1 commit 09cb27a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 12 deletions.
2 changes: 2 additions & 0 deletions wallets/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export type ConnectResult = {
provider: any;
};

export type Providers = { [type in WalletType]?: any };

export enum Events {
CONNECTED = 'connected',
CONNECTING = 'connecting',
Expand Down
3 changes: 2 additions & 1 deletion wallets/react/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import type {
} from '@rango-dev/wallets-core';
import type {
Network,
Providers,
WalletInfo,
WalletType,
} from '@rango-dev/wallets-shared';
Expand All @@ -21,6 +20,8 @@ export type ConnectResult = {
provider: any;
};

export type Providers = { [type in WalletType]?: any };

export type ProviderContext = {
connect(type: WalletType, network?: Network): Promise<ConnectResult>;
disconnect(type: WalletType): Promise<void>;
Expand Down
2 changes: 1 addition & 1 deletion wallets/wallets-adapter/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Providers } from '@rango-dev/wallets-react';
import type {
Network,
Providers,
WalletInfo,
WalletType,
} from '@rango-dev/wallets-shared';
Expand Down
28 changes: 18 additions & 10 deletions widget/embedded/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,25 +64,19 @@ import { customizedThemeTokens } from './utils/ui';
export type {
WidgetConfig,
WalletType,
WalletState,
WalletInfo,
WidgetTheme,
WidgetColors,
WidgetColorsKeys,
ProviderInterface,
BlockchainAndTokenConfig,
WidgetProps,
PendingSwap,
PendingSwapWithQueueID,
PendingSwapStep,
RouteEvent,
StepEvent,
Route,
Step,
RouteStartedEvent,
RouteSucceededEvent,
RouteFailedEvent,
RouteExecutionEvents,
StepStartedEvent,
StepSucceededEvent,
StepFailedEvent,
Expand All @@ -93,7 +87,6 @@ export type {
StepOutputRevealedEvent,
HandleWalletsUpdate,
ConnectedWallet,
EventSeverity,
};
export {
Widget,
Expand All @@ -106,14 +99,29 @@ export {
useWallets,
useWidgetEvents,
customizedThemeTokens,
readAccountAddress,
MainEvents,
Networks,
WalletEvents,
RouteEventType,
StepEventType,
StepExecutionEventStatus,
StepExecutionBlockedEventStatus,
};

// Internal type exports for Rango
export type {
WalletState,
WalletInfo,
PendingSwap,
PendingSwapWithQueueID,
PendingSwapStep,
RouteExecutionEvents,
EventSeverity,
};

// Internal function and enum exports for Rango
export {
readAccountAddress,
Networks,
WalletEvents,
WalletTypes,
PendingSwapNetworkStatus,
};

0 comments on commit 09cb27a

Please sign in to comment.