Skip to content

Commit

Permalink
fixed: To resolve module not found compilation errors in the CRA app. (
Browse files Browse the repository at this point in the history
…#85)

* fixed: To resolve module not found compilation errors in the CRA application, modify the export method in xverse to explicitly specify the .js extension.

---------

Co-authored-by: Hanssen <[email protected]>
  • Loading branch information
yixyxiu and Hanssen0 authored Nov 14, 2024
1 parent 308c60e commit 91832b1
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .changeset/rare-months-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ckb-ccc/xverse": patch
---

fixed: To resolve module not found compilation errors in the CRA app.
8 changes: 4 additions & 4 deletions packages/xverse/src/sat-connect-core/advanced.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from "./btcMethods.advanced";
export * from "./provider.advanced";
export * from "./requests.advanced";
export * from "./types.advanced";
export * from "./btcMethods.advanced.js";
export * from "./provider.advanced.js";
export * from "./requests.advanced.js";
export * from "./types.advanced.js";
4 changes: 2 additions & 2 deletions packages/xverse/src/sat-connect-core/btcMethods.advanced.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import * as v from "valibot";
import {
MethodParamsAndResult,
rpcRequestMessageSchema,
} from "./types.advanced";
import { walletTypeSchema } from "./walletMethods.advanced";
} from "./types.advanced.js";
import { walletTypeSchema } from "./walletMethods.advanced.js";

export enum AddressPurpose {
Ordinals = "ordinals",
Expand Down
4 changes: 2 additions & 2 deletions packages/xverse/src/sat-connect-core/provider.advanced.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as v from "valibot";
import { Params, Requests } from "./requests.advanced";
import { RpcResponse } from "./types.advanced";
import { Params, Requests } from "./requests.advanced.js";
import { RpcResponse } from "./types.advanced.js";

// accountChange
export const accountChangeEventName = "accountChange";
Expand Down
4 changes: 2 additions & 2 deletions packages/xverse/src/sat-connect-core/requests.advanced.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import {
SendTransfer,
SignMessage,
SignPsbt,
} from "./btcMethods.advanced";
} from "./btcMethods.advanced.js";
import {
GetWalletType,
RenouncePermissions,
RequestPermissions,
} from "./walletMethods.advanced";
} from "./walletMethods.advanced.js";

export interface BtcRequests {
getInfo: GetInfo;
Expand Down
4 changes: 2 additions & 2 deletions packages/xverse/src/sat-connect-core/types.advanced.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// From https://github.com/secretkeylabs/sats-connect-core/

import * as v from "valibot";
import type { BtcProvider } from "./provider.advanced";
import type { Requests, Return } from "./requests.advanced";
import type { BtcProvider } from "./provider.advanced.js";
import type { Requests, Return } from "./requests.advanced.js";

export enum BitcoinNetworkType {
Mainnet = "Mainnet",
Expand Down

0 comments on commit 91832b1

Please sign in to comment.