From 009d0c49dc2dbc457982e8effc048cbb1e496d36 Mon Sep 17 00:00:00 2001 From: anilhelvaci Date: Sat, 5 Oct 2024 14:54:54 +0300 Subject: [PATCH] fix: fix typos --- .../z:acceptance/test-lib/sync-tools.js | 64 +++++++++---------- .../z:acceptance/test-lib/sync-tools.test.js | 6 +- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/a3p-integration/proposals/z:acceptance/test-lib/sync-tools.js b/a3p-integration/proposals/z:acceptance/test-lib/sync-tools.js index 26353453643b..ad69b09741a6 100644 --- a/a3p-integration/proposals/z:acceptance/test-lib/sync-tools.js +++ b/a3p-integration/proposals/z:acceptance/test-lib/sync-tools.js @@ -1,10 +1,10 @@ /** - * @file The purpose of this file is to bring together a set of tool that + * @file The purpose of this file is to bring together a set of tools that * developers can use to synchronize operations they carry out in their tests. * * These operations include; - * - Making sure a core-eval resulted succesfully deploying a contract - * - Making sure a core-eval succesfully sent zoe invitations to committee members for governance + * - Making sure a core-eval resulted in successfully deploying a contract + * - Making sure a core-eval successfully sent zoe invitations to committee members for governance * - Making sure an account is successfully funded with vbank assets like IST, BLD etc. * - operation: query dest account's balance * - condition: dest account has a balance >= sent token @@ -13,7 +13,7 @@ */ /** - * @typedef {object} RetyrOptions + * @typedef {object} RetryOptions * @property {number} maxRetries * @property {number} retryIntervalMs * @property {(...arg0: string[]) => void} log @@ -21,7 +21,7 @@ * @property {string} [errorMessage=Error] * * - * @typedef {object} CosmosBalanceThresold + * @typedef {object} CosmosBalanceThreshold * @property {string} denom * @property {number} value */ @@ -48,7 +48,7 @@ const sleep = (ms, { log = () => {}, setTimeout = ambientSetTimeout }) => * @param {() => Promise} operation * @param {(result: any) => boolean} condition * @param {string} message - * @param {RetyrOptions} options + * @param {RetryOptions} options * @returns */ const retryUntilCondition = async ( @@ -86,7 +86,7 @@ const retryUntilCondition = async ( }; /** - * Making sure a core-eval resulted succesfully deploying a contract + * Making sure a core-eval resulted successfully deploying a contract */ const makeGetInstances = follow => async () => { const instanceEntries = await follow( @@ -100,16 +100,16 @@ const makeGetInstances = follow => async () => { /** * * @param {string} contractName - * @param {{follow: () => object, setTimeout: (object) => void}} ambientAuthroity - * @param {RetyrOptions} options + * @param {{follow: () => object, setTimeout: (object) => void}} ambientAuthority + * @param {RetryOptions} options * @returns */ -export const waitUntilContractDeplyed = ( +export const waitUntilContractDeployed = ( contractName, - ambientAuthroity, + ambientAuthority, options, ) => { - const { follow, setTimeout } = ambientAuthroity; + const { follow, setTimeout } = ambientAuthority; const getInstances = makeGetInstances(follow); const { maxRetries = 6, @@ -129,37 +129,37 @@ export const waitUntilContractDeplyed = ( // Making sure an account is successfully funded with vbank assets like IST, BLD etc. -const makeQueryCosmosBalace = queryCb => async dest => { - const conins = await queryCb('bank', 'balances', dest); - return conins.balances; +const makeQueryCosmosBalance = queryCb => async dest => { + const coins = await queryCb('bank', 'balances', dest); + return coins.balances; }; /** * * @param {Array} balances - * @param {CosmosBalanceThresold} thresold + * @param {CosmosBalanceThreshold} threshold * @returns {boolean} */ -const checkCosmosBalance = (balances, thresold) => { - const balance = [...balances].find(({ denom }) => denom === thresold.denom); - return Number(balance.amount) >= thresold.value; +const checkCosmosBalance = (balances, threshold) => { + const balance = [...balances].find(({ denom }) => denom === threshold.denom); + return Number(balance.amount) >= threshold.value; }; /** * @param {string} destAcct - * @param {{query: () => Promise, setTimeout: (object) => void}} ambientAuthroity + * @param {{query: () => Promise, setTimeout: (object) => void}} ambientAuthority * @param {{denom: string, value: number}} threshold - * @param {RetyrOptions} options + * @param {RetryOptions} options * @returns */ export const waitUntilAccountFunded = ( destAcct, - ambientAuthroity, + ambientAuthority, threshold, options, ) => { - const { query, setTimeout } = ambientAuthroity; - const queryCosmosBalance = makeQueryCosmosBalace(query); + const { query, setTimeout } = ambientAuthority; + const queryCosmosBalance = makeQueryCosmosBalance(query); const { maxRetries = 6, retryIntervalMs = 3500, @@ -209,18 +209,18 @@ const checkOfferState = (offerStatus, waitForPayouts, offerId) => { * @param {string} addr * @param {string} offerId * @param {boolean} waitForPayouts - * @param {{follow: () => object, setTimeout: (object) => void}} ambientAuthroity - * @param {RetyrOptions} options + * @param {{follow: () => object, setTimeout: (object) => void}} ambientAuthority + * @param {RetryOptions} options * @returns */ export const waitUntilOfferResult = ( addr, offerId, waitForPayouts, - ambientAuthroity, + ambientAuthority, options, ) => { - const { follow, setTimeout } = ambientAuthroity; + const { follow, setTimeout } = ambientAuthority; const queryWallet = makeQueryWallet(follow); const { maxRetries = 6, @@ -257,16 +257,16 @@ const checkForInvitation = update => { /** * * @param {string} addr - * @param {{follow: () => object, setTimeout: (object) => void}} ambientAuthroity - * @param {RetyrOptions} options + * @param {{follow: () => object, setTimeout: (object) => void}} ambientAuthority + * @param {RetryOptions} options * @returns */ export const waitUntilInvitationReceived = ( addr, - ambientAuthroity, + ambientAuthority, options, ) => { - const { follow, setTimeout } = ambientAuthroity; + const { follow, setTimeout } = ambientAuthority; const queryWallet = makeQueryWallet(follow); const { maxRetries = 6, diff --git a/a3p-integration/proposals/z:acceptance/test-lib/sync-tools.test.js b/a3p-integration/proposals/z:acceptance/test-lib/sync-tools.test.js index faa7a7263164..3d12388b7388 100644 --- a/a3p-integration/proposals/z:acceptance/test-lib/sync-tools.test.js +++ b/a3p-integration/proposals/z:acceptance/test-lib/sync-tools.test.js @@ -3,7 +3,7 @@ import test from 'ava'; import '@endo/init/debug.js'; import { waitUntilAccountFunded, - waitUntilContractDeplyed, + waitUntilContractDeployed, waitUntilInvitationReceived, waitUntilOfferResult, } from './sync-tools.js'; @@ -43,7 +43,7 @@ const makeFakeBalanceQuery = () => { test.serial('wait until contract is deployed', async t => { const { setValue, follow } = makeFakeFollow(); - const waitP = waitUntilContractDeplyed( + const waitP = waitUntilContractDeployed( 'name', { follow, @@ -53,7 +53,7 @@ test.serial('wait until contract is deployed', async t => { maxRetries: 5, retryIntervalMs: 1000, log: t.log, - errorMessage: 'Contact not deplyed yet', + errorMessage: 'Contract not deployed yet', }, );