Skip to content

Commit

Permalink
Merge pull request #1230 from kujtimprenku/fix/remove-near-js-individ…
Browse files Browse the repository at this point in the history
…ual-packages

fix: Fix imports and remove unnecessary peer dependency
  • Loading branch information
gtsonevv authored Dec 13, 2024
2 parents 6611c19 + 5fde290 commit 5deac85
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
5 changes: 2 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
},
"homepage": "https://github.com/near/wallet-selector/tree/main/packages/core",
"peerDependencies": {
"near-api-js": "4.0.3",
"@near-js/providers": "latest"
"near-api-js": "4.0.3"
}
}
}
10 changes: 6 additions & 4 deletions packages/core/src/lib/wallet-selector.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { setupWalletSelector } from "./wallet-selector";
import { FailoverRpcProvider } from "@near-js/providers";
import { getNetworkPreset } from "./options";
import { JsonRpcProvider } from "near-api-js/lib/providers";
import {
JsonRpcProvider,
FailoverRpcProvider,
} from "near-api-js/lib/providers";
import type { Network } from "./options.types";
import type { Store } from "./store.types";
import type { WalletModuleFactory } from "./wallet";
Expand Down Expand Up @@ -52,8 +54,8 @@ jest.mock("./store", () => {
};
});

jest.mock("@near-js/providers", () => {
const originalModule = jest.requireActual("@near-js/providers");
jest.mock("near-api-js/lib/providers", () => {
const originalModule = jest.requireActual("near-api-js/lib/providers");
return {
...originalModule,
FailoverRpcProvider: jest.fn(),
Expand Down

0 comments on commit 5deac85

Please sign in to comment.