From 06b7a516137f4fc55a4c6aa3468c8f2ef4a8bd3c Mon Sep 17 00:00:00 2001 From: Alex Ni <12097569+nialexsan@users.noreply.github.com> Date: Thu, 26 Oct 2023 13:52:39 -0400 Subject: [PATCH 1/3] OPS -- fcl -- move utils --- packages/fcl/src/app-utils/verify-signatures.js | 2 +- packages/fcl/src/current-user/exec-service/plugins.js | 2 +- packages/fcl/src/exec/mutate.js | 2 +- packages/fcl/src/exec/utils/normalize-args.js | 2 +- packages/fcl/src/exec/utils/pre.js | 2 +- packages/fcl/src/exec/utils/prep-template-opts.js | 2 +- packages/fcl/src/{exec => }/utils/is.js | 0 7 files changed, 6 insertions(+), 6 deletions(-) rename packages/fcl/src/{exec => }/utils/is.js (100%) diff --git a/packages/fcl/src/app-utils/verify-signatures.js b/packages/fcl/src/app-utils/verify-signatures.js index ccd7748f7..184df57eb 100644 --- a/packages/fcl/src/app-utils/verify-signatures.js +++ b/packages/fcl/src/app-utils/verify-signatures.js @@ -2,7 +2,7 @@ import {invariant} from "@onflow/util-invariant" import {withPrefix, sansPrefix} from "@onflow/util-address" import {query} from "../exec/query" import {encodeAccountProof} from "../wallet-utils" -import {isString} from "../exec/utils/is" +import {isString} from "../utils/is" import {getChainId} from "../utils" const ACCOUNT_PROOF = "ACCOUNT_PROOF" diff --git a/packages/fcl/src/current-user/exec-service/plugins.js b/packages/fcl/src/current-user/exec-service/plugins.js index 026374789..8aaf9f449 100644 --- a/packages/fcl/src/current-user/exec-service/plugins.js +++ b/packages/fcl/src/current-user/exec-service/plugins.js @@ -1,6 +1,6 @@ import {invariant} from "@onflow/util-invariant" import {LEVELS, log} from "@onflow/util-logger" -import {isRequired, isString, isObject, isFunc} from "../../exec/utils/is" +import {isRequired, isString, isObject, isFunc} from "../../utils/is" import { CORE_STRATEGIES } from "../../utils/constants" const stub = () => { diff --git a/packages/fcl/src/exec/mutate.js b/packages/fcl/src/exec/mutate.js index c1dae1eec..1d1120617 100644 --- a/packages/fcl/src/exec/mutate.js +++ b/packages/fcl/src/exec/mutate.js @@ -3,7 +3,7 @@ import {normalizeArgs} from "./utils/normalize-args" import {getCurrentUser} from "../current-user" import {prepTemplateOpts} from "./utils/prep-template-opts.js" import {preMutate} from "./utils/pre.js" -import {isNumber} from "./utils/is" +import {isNumber} from "../utils/is" export const getMutate = ({platform}) => { /** diff --git a/packages/fcl/src/exec/utils/normalize-args.js b/packages/fcl/src/exec/utils/normalize-args.js index 957600c72..b0cc38589 100644 --- a/packages/fcl/src/exec/utils/normalize-args.js +++ b/packages/fcl/src/exec/utils/normalize-args.js @@ -1,4 +1,4 @@ -import {isFunc} from "./is" +import {isFunc} from "../../utils/is" import * as sdk from "@onflow/sdk" import * as t from "@onflow/types" diff --git a/packages/fcl/src/exec/utils/pre.js b/packages/fcl/src/exec/utils/pre.js index 6057553dc..a92962836 100644 --- a/packages/fcl/src/exec/utils/pre.js +++ b/packages/fcl/src/exec/utils/pre.js @@ -1,6 +1,6 @@ import {invariant} from "@onflow/util-invariant" import * as sdk from "@onflow/sdk" -import {isRequired, isObject, isString} from "./is" +import {isRequired, isObject, isString} from "../../utils/is" async function pre(type, opts) { // prettier-ignore diff --git a/packages/fcl/src/exec/utils/prep-template-opts.js b/packages/fcl/src/exec/utils/prep-template-opts.js index 66db578b5..3653fb4db 100644 --- a/packages/fcl/src/exec/utils/prep-template-opts.js +++ b/packages/fcl/src/exec/utils/prep-template-opts.js @@ -2,7 +2,7 @@ import {retrieve} from "../../document/document.js" import {normalizeInteractionTemplate} from "../../normalizers/interaction-template/interaction-template" import {deriveCadenceByNetwork} from "../../interaction-template-utils/derive-cadence-by-network.js" import {deriveDependencies} from "./derive-dependencies" -import {isString} from "./is" +import {isString} from "../../utils/is.js" import {getChainId} from "../../utils" export async function prepTemplateOpts(opts) { diff --git a/packages/fcl/src/exec/utils/is.js b/packages/fcl/src/utils/is.js similarity index 100% rename from packages/fcl/src/exec/utils/is.js rename to packages/fcl/src/utils/is.js From f2f1f91e4873e86075470166a589876ea240b687 Mon Sep 17 00:00:00 2001 From: Alex <12097569+nialexsan@users.noreply.github.com> Date: Fri, 27 Oct 2023 11:17:24 -0400 Subject: [PATCH 2/3] Update packages/fcl/src/exec/utils/prep-template-opts.js Co-authored-by: Jordan Ribbink --- packages/fcl/src/exec/utils/prep-template-opts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fcl/src/exec/utils/prep-template-opts.js b/packages/fcl/src/exec/utils/prep-template-opts.js index 3653fb4db..29f5e0bc6 100644 --- a/packages/fcl/src/exec/utils/prep-template-opts.js +++ b/packages/fcl/src/exec/utils/prep-template-opts.js @@ -2,7 +2,7 @@ import {retrieve} from "../../document/document.js" import {normalizeInteractionTemplate} from "../../normalizers/interaction-template/interaction-template" import {deriveCadenceByNetwork} from "../../interaction-template-utils/derive-cadence-by-network.js" import {deriveDependencies} from "./derive-dependencies" -import {isString} from "../../utils/is.js" +import {isString} from "../../utils/is" import {getChainId} from "../../utils" export async function prepTemplateOpts(opts) { From 957edb052d45eb4b00f32be6abdd06add68ba9df Mon Sep 17 00:00:00 2001 From: Alex Ni <12097569+nialexsan@users.noreply.github.com> Date: Fri, 27 Oct 2023 11:39:19 -0400 Subject: [PATCH 3/3] changeset --- .changeset/twenty-zoos-battle.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/twenty-zoos-battle.md diff --git a/.changeset/twenty-zoos-battle.md b/.changeset/twenty-zoos-battle.md new file mode 100644 index 000000000..9593838a6 --- /dev/null +++ b/.changeset/twenty-zoos-battle.md @@ -0,0 +1,5 @@ +--- +"@onflow/fcl": patch +--- + +Move is-helpers to utils