Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jribbink committed Nov 25, 2024
1 parent 72551ec commit 589cf5b
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/sdk/src/account/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {atBlockId} from "../build/build-at-block-id.js"
import {getAccount} from "../build/build-get-account.js"
import {invariant} from "@onflow/util-invariant"
import {decodeResponse as decode} from "../decode/decode.js"
import {send} from "../transport/send.js"
import {send} from "../transport/send"

/**
* @typedef {import("@onflow/typedefs").Account} Account
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/block/block.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {send} from "../transport/send.js"
import {send} from "../transport/send"
import {getBlock} from "../build/build-get-block"
import {atBlockHeight} from "../build/build-at-block-height.js"
import {atBlockId} from "../build/build-at-block-id.js"
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/contract.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as root from "./sdk"
import * as decode from "./decode/decode.js"
import * as encode from "./encode/encode"
import * as interaction from "./interaction/interaction"
import * as send from "./send/send.js"
import * as send from "./send/send"
import * as template from "@onflow/util-template"

const interfaceContract =
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/node-version-info/node-version-info.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {send} from "../transport/send.js"
import {send} from "../transport/send"
import {decodeResponse as decode} from "../decode/decode.js"
import {getNodeVersionInfo} from "../build/build-get-node-version-info"
import {NodeVersionInfo} from "@onflow/typedefs"
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as logger from "@onflow/util-logger"
// Base
export {build} from "./build/build.js"
export {resolve} from "./resolve/resolve.js"
export {send} from "./transport/send.js"
export {send} from "./transport/send"
export {decode} from "./decode/sdk-decode.js"
export {
encodeTransactionPayload,
Expand Down
12 changes: 6 additions & 6 deletions packages/sdk/src/transport/send.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {Buffer} from "@onflow/rlp"
import {initInteraction, pipe} from "../interaction/interaction.js"
import * as ixModule from "../interaction/interaction.js"
import {invariant} from "../build/build-invariant.js"
import {response} from "../response/response.js"
import {initInteraction, pipe} from "../interaction/interaction"
import * as ixModule from "../interaction/interaction"
import {invariant} from "../build/build-invariant"
import {response} from "../response/response"
import {config} from "@onflow/config"
import {resolve as defaultResolve} from "../resolve/resolve.js"
import {getTransport} from "./transport.js"
import {resolve as defaultResolve} from "../resolve/resolve"
import {getTransport} from "./transport"

/**
* @description - Sends arbitrary scripts, transactions, and requests to Flow
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/transport/transport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export async function getTransport(
} = {}
): Promise<SdkTransport.Transport> {
invariant(
opts.send != null && opts.transport != null,
opts.send == null || opts.transport == null,
`SDK Transport Error: Cannot provide both "transport" and legacy "send" options.`
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
import {SubscriptionManager} from "./subscription-manager"
import {SdkTransport} from "@onflow/typedefs"

jest.mock("../websocket", () => ({
jest.mock("./websocket", () => ({
WebSocket: mockSocket,
}))

Expand Down

0 comments on commit 589cf5b

Please sign in to comment.