Skip to content

Commit

Permalink
chore: remove hub from exporting
Browse files Browse the repository at this point in the history
  • Loading branch information
nikaaru committed Dec 9, 2024
1 parent 6bb9abc commit a5703c2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
6 changes: 1 addition & 5 deletions wallets/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@
"./namespaces/solana": {
"types": "./dist/namespaces/solana/mod.d.ts",
"default": "./dist/namespaces/solana/mod.js"
},
"./hub": {
"types": "./dist/hub/mod.d.ts",
"default": "./dist/hub/mod.js"
}
},
"files": [
Expand All @@ -42,7 +38,7 @@
"legacy"
],
"scripts": {
"build": "node ../../scripts/build/command.mjs --path wallets/core --inputs src/mod.ts,src/utils/mod.ts,src/legacy/mod.ts,src/namespaces/evm/mod.ts,src/namespaces/solana/mod.ts,src/namespaces/common/mod.ts,src/hub/mod.ts",
"build": "node ../../scripts/build/command.mjs --path wallets/core --inputs src/mod.ts,src/utils/mod.ts,src/legacy/mod.ts,src/namespaces/evm/mod.ts,src/namespaces/solana/mod.ts,src/namespaces/common/mod.ts",
"ts-check": "tsc --declaration --emitDeclarationOnly -p ./tsconfig.json",
"clean": "rimraf dist",
"format": "prettier --write '{.,src}/**/*.{ts,tsx}'",
Expand Down
2 changes: 1 addition & 1 deletion wallets/core/src/hub/mod.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export { Namespace } from './namespaces/mod.js';
export type { Subscriber, SubscriberCleanUp } from './namespaces/mod.js';

export { Provider } from './provider/mod.js';
export type { CommonNamespaces, CommonNamespaceKeys } from './provider/mod.js';

Expand Down
5 changes: 5 additions & 0 deletions wallets/core/src/namespaces/common/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ export type {
Accounts,
AccountsWithActiveChain,
} from '../../types/accounts.js';

export type {
Subscriber,
SubscriberCleanUp,
} from '../../hub/namespaces/mod.js';
6 changes: 5 additions & 1 deletion wallets/provider-clover/src/actions/solana.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type {
Subscriber,
SubscriberCleanUp,
} from '@rango-dev/wallets-core/hub';
} from '@rango-dev/wallets-core/namespaces/common';

import {
CAIP_NAMESPACE,
Expand All @@ -12,6 +12,10 @@ import { AccountId } from 'caip';

import { evmClover, solanaClover } from '../utils.js';

/*
* The EVM instance is used to listen for the accountsChanged event,
* because Clover itself did not have a chain change event for the Solana namespace.
*/
export function changeAccountSubscriberAction(): [
Subscriber<SolanaActions>,
SubscriberCleanUp<SolanaActions>
Expand Down

0 comments on commit a5703c2

Please sign in to comment.