diff --git a/packages/account/src/account.ts b/packages/account/src/account.ts index 1d51fd4eb..25a3e4ec4 100644 --- a/packages/account/src/account.ts +++ b/packages/account/src/account.ts @@ -247,7 +247,7 @@ export function createAccountWithPreset(preset: AccountPreset) getTotalBalance: () => { return persistence .ready() - .then(() => network.getBalances(addresses, 100)) + .then(() => network.getBalances(addresses)) .then(({ balances }) => balances.reduce((acc: number, b: number) => (acc += b), 0)) }, getAvailableBalance: () => { @@ -257,7 +257,7 @@ export function createAccountWithPreset(preset: AccountPreset) .then(currentTime => { const depositsListCopy = [...depositsList] return network - .getBalances(depositsListCopy.map(({ address }) => tritsToTrytes(address)), 100) + .getBalances(depositsListCopy.map(({ address }) => tritsToTrytes(address))) .then(({ balances }: { balances: ReadonlyArray }) => { let acc = 0 depositsListCopy.forEach((input, i) => { @@ -287,7 +287,7 @@ export function createAccountWithPreset(preset: AccountPreset) ) .then(depositsListCopy => network - .getBalances(depositsListCopy.map(deposit => deposit.address), 100) + .getBalances(depositsListCopy.map(deposit => deposit.address)) .then(({ balances }: { balances: ReadonlyArray }) => depositsListCopy.map((deposit, i) => ({ ...deposit, diff --git a/packages/account/src/preset.ts b/packages/account/src/preset.ts index 4b98adadb..3f637c5e7 100644 --- a/packages/account/src/preset.ts +++ b/packages/account/src/preset.ts @@ -80,7 +80,7 @@ export function networkAdapter({ provider }: NetworkParams): Network { return { getTrytes: hashes => (hashes.length > 0 ? getTrytes(hashes) : Promise.resolve([])), - getBalance: (address): Promise => getBalances([address], 100).then(({ balances }) => balances[0]), + getBalance: (address): Promise => getBalances([address]).then(({ balances }) => balances[0]), getBalances, getConsistency: createCheckConsistency(httpClient), getLatestInclusion: hashes => (hashes.length > 0 ? getLatestInclusion(hashes) : Promise.resolve([])), diff --git a/packages/account/test/account.test.ts b/packages/account/test/account.test.ts index 27746df9b..ce313a47b 100644 --- a/packages/account/test/account.test.ts +++ b/packages/account/test/account.test.ts @@ -53,7 +53,6 @@ const assertBalance = (address: Trytes, balance: number) => .post('/', { command: IRICommand.GET_BALANCES, addresses: [noChecksum(address)], - threshold: 100, }) .times(1) .reply(200, { diff --git a/packages/core/README.md b/packages/core/README.md index 9702b5bb8..32ef15d5c 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -45,7 +45,7 @@ yarn add @iota/core * [.getAccountData(seed, options, [callback])](#module_core.getAccountData) - * [.getBalances(addresses, threshold, [tips], [callback])](#module_core.getBalances) + * [.getBalances(addresses, [tips], [callback])](#module_core.getBalances) * [.getBundle(tailTransactionHash, [callback])](#module_core.getBundle) @@ -469,7 +469,7 @@ getAccountData(seed) ``` -### *core*.getBalances(addresses, threshold, [tips], [callback]) +### *core*.getBalances(addresses, [tips], [callback]) **Summary**: Gets the confirmed balances of the given addresses. **Fulfil**: Balances balances - Object that contains the following: - balances.addresses: Array of balances in the same order as the `addresses` argument @@ -478,13 +478,11 @@ getAccountData(seed) - balances.duration: The number of milliseconds that it took for the node to return a response **Reject**: Error error - An error that contains one of the following: - `INVALID_HASH`: Make sure that the addresses contain only trytes -- `INVALID_THRESHOLD`: Make sure that the threshold is a number greater than zero - Fetch error: The connected IOTA node's API returned an error. See the [list of error messages](https://docs.iota.org/docs/node-software/0.1/iri/references/api-errors) | Param | Type | Description | | --- | --- | --- | | addresses | Array.<Hash> | Array of addresses | -| threshold | number | Not used, but should be set to 100 until [this issue](https://github.com/iotaledger/iri/issues/1723) is resolved. | | [tips] | Array.<Hash> | Array of past transaction hashes from which to calculate the balances of the addresses. The balance will be calculated from the latest milestone that references these transactions. | | [callback] | Callback | Optional callback function | @@ -499,7 +497,7 @@ To find the balance of all addresses that belong to your seed, use the [`getAcco **Example** ```js -getBalances([address], 100) +getBalances([address]) .then( balances => { console.log(`Balance of the first address: `$balances.balances[0]) console.log(JSON.stringify(transactions)); diff --git a/packages/core/src/createGetAccountData.ts b/packages/core/src/createGetAccountData.ts index 5e91b48f2..f81427e71 100644 --- a/packages/core/src/createGetAccountData.ts +++ b/packages/core/src/createGetAccountData.ts @@ -48,11 +48,11 @@ export const getAccountDataOptions = getOptionsWithDefaults(defaults) /** * @method createGetAccountData - * + * * @summary Creates a new `getAccountData()` method, using a custom Provider instance. * * @memberof module:core - * + * * @ignore * * @param {Provider} provider - The Provider object that the method should use to call the node's API endpoints. @@ -67,21 +67,21 @@ export const createGetAccountData = (provider: Provider, caller?: string) => { /** * This method generates [addresses](https://docs.iota.org/docs/getting-started/0.1/clients/addresses) for a given seed, and searches the Tangle for data about those addresses such as transactions, inputs, and total balance. - * + * * **Note:** The given seed is used to [generate addresses](https://docs.iota.org/docs/client-libraries/0.1/how-to-guides/js/generate-an-address) on your local device. It is never sent anywhere. - * + * * If you don't pass an `options.end` argument to this method, it will continue to generate addresses until it finds an unspent one. - * + * * **Note:** The total balance does not include IOTA tokens on [spent addresses](https://docs.iota.org/docs/getting-started/0.1/clients/addresses#spent-addresses). - * + * * ## Related methods - * + * * To find the balance of specific addresses, which don't have to belong to your seed, use the [`getBalances()`]{@link #module_core.getBalances} method. - * + * * To find only inputs (objects that contain information about addresses with a postive balance), use the [`getInputs()`]{@link #module_core.getInputs} method. - * + * * @method getAccountData - * + * * @summary Searches the Tangle for transctions, addresses, and balances that are associated with a given seed. * * @memberof module:core @@ -92,7 +92,7 @@ export const createGetAccountData = (provider: Provider, caller?: string) => { * @param {number} [options.security=2] - The [security level](https://docs.iota.org/docs/getting-started/0.1/clients/security-levels) to use to generate the addresses * @paramĀ {number} [options.end] - The key index at which to stop generating addresses * @param {Callback} [callback] - Optional callback function - * + * * @example * * ```js @@ -108,7 +108,7 @@ export const createGetAccountData = (provider: Provider, caller?: string) => { * ``` * * @returns {Promise} - * + * * @fulfil {AccountData} accountData - Object that contains the following: * - accountData.transfers: (deprecated) Array of transaction objects that contain one of the seed's addresses * - accountData.transactions: Array of transaction hashes for transactions that contain one of the seed's addresses @@ -119,13 +119,13 @@ export const createGetAccountData = (provider: Provider, caller?: string) => { * - accountData.inputs.security: Security level of the address * - accountData.inputs.balance: Balance of the address * - accountData.balance: The total balance of unspent addresses - * + * * @reject {Error} error - An error that contains one of the following: * - `INVALID_SEED`: Make sure that the seed contains only trytes * - `INVALID_SECURITY_LEVEL`: Make sure that the security level is a number between 1 and 3 * - `INVALID_START_OPTION`: Make sure that the `options.start` argument is greater than zero * - `INVALID_START_END_OPTIONS`: Make sure that the `options.end` argument is not greater than the `options.start` argument by more than 1,000` - * - Fetch error: The connected IOTA node's API returned an error. See the [list of error messages](https://docs.iota.org/docs/node-software/0.1/iri/references/api-errors) + * - Fetch error: The connected IOTA node's API returned an error. See the [list of error messages](https://docs.iota.org/docs/node-software/0.1/iri/references/api-errors) */ return ( seed: string, @@ -138,7 +138,7 @@ export const createGetAccountData = (provider: Provider, caller?: string) => { /* tslint:disable-next-line:no-console */ console.warn( 'The returned `accountData.transfers` field is deprecated, therefore do not rely on this field in your applications.\n' + - 'Instead, you can get only the transactions that you need by using the transaction hashes returned in the `accountData.transactions` field.' + 'Instead, you can get only the transactions that you need by using the transaction hashes returned in the `accountData.transactions` field.' ) } @@ -168,7 +168,7 @@ export const createGetAccountData = (provider: Provider, caller?: string) => { Promise.all([ getBundlesFromAddresses(addresses, true), // findTransactions({ addresses }), // Find transactions instead of getBundlesFromAddress as of v2.0.0 - getBalances(addresses, 100), + getBalances(addresses), wereAddressesSpentFrom(addresses), addresses, ]) diff --git a/packages/core/src/createGetBalances.ts b/packages/core/src/createGetBalances.ts index 511da070d..0326f3433 100644 --- a/packages/core/src/createGetBalances.ts +++ b/packages/core/src/createGetBalances.ts @@ -3,16 +3,16 @@ import { TRYTE_WIDTH } from '@iota/converter' import { TRANSACTION_HASH_LENGTH } from '@iota/transaction' import * as Promise from 'bluebird' import * as errors from '../../errors' -import { getBalancesThresholdValidator, isHash, isTrytesOfExactLength, validate } from '../../guards' +import { isHash, isTrytesOfExactLength, validate } from '../../guards' import { Balances, Callback, GetBalancesCommand, GetBalancesResponse, Hash, IRICommand, Provider } from '../../types' /** * @method createGetBalances - * + * * @summary Creates a new `getBalances()` method, using a custom Provider instance. * * @memberof module:core - * + * * @ignore * * @param {Provider} provider - The Provider object that the method should use to call the node's API endpoints. @@ -25,25 +25,24 @@ export const createGetBalances = ({ send }: Provider) => * * Any pending output transactions are not included in the balance. * For example, if a pending output transaction deposits 10 Mi into an address that contains 50 Mi, this method will return a balance of 50 Mi not 60 Mi. - * + * * ## Related methods - * + * * To find the balance of all addresses that belong to your seed, use the [`getAccountData()`]{@link #module_core.getAccountData} method. - * + * * @method getBalances - * + * * @summary Gets the confirmed balances of the given addresses. - * + * * @memberof module:core * * @param {Hash[]} addresses - Array of addresses - * @param {number} threshold - Not used, but should be set to 100 until [this issue](https://github.com/iotaledger/iri/issues/1723) is resolved. * @param {Hash[]} [tips] - Array of past transaction hashes from which to calculate the balances of the addresses. The balance will be calculated from the latest milestone that references these transactions. * @param {Callback} [callback] - Optional callback function - * + * * @example * ```js - * getBalances([address], 100) + * getBalances([address]) * .then( balances => { * console.log(`Balance of the first address: `$balances.balances[0]) * console.log(JSON.stringify(transactions)); @@ -54,24 +53,18 @@ export const createGetBalances = ({ send }: Provider) => * ``` * * @return {Promise} - * + * * @fulfil {Balances} balances - Object that contains the following: * - balances.addresses: Array of balances in the same order as the `addresses` argument * - balances.references: Either the transaction hash of the latest milestone, or the transaction hashes that were passed to the `tips` argument * - balances.milestoneIndex: The latest milestone index that confirmed the balance * - balances.duration: The number of milliseconds that it took for the node to return a response - * + * * @reject {Error} error - An error that contains one of the following: * - `INVALID_HASH`: Make sure that the addresses contain only trytes - * - `INVALID_THRESHOLD`: Make sure that the threshold is a number greater than zero - * - Fetch error: The connected IOTA node's API returned an error. See the [list of error messages](https://docs.iota.org/docs/node-software/0.1/iri/references/api-errors) + * - Fetch error: The connected IOTA node's API returned an error. See the [list of error messages](https://docs.iota.org/docs/node-software/0.1/iri/references/api-errors) */ - ( - addresses: ReadonlyArray, - threshold: number, - tips?: ReadonlyArray, - callback?: Callback - ): Promise => { + (addresses: ReadonlyArray, tips?: ReadonlyArray, callback?: Callback): Promise => { // If no tips are provided, switch arguments if (tips && typeof tips === 'function') { callback = tips @@ -81,7 +74,6 @@ export const createGetBalances = ({ send }: Provider) => return Promise.resolve( validate( [addresses, (arr: Hash[]) => arr.every(isHash), errors.INVALID_ADDRESS], - getBalancesThresholdValidator(threshold), !!tips && [ tips, (arr: Hash[]) => arr.every(h => isTrytesOfExactLength(h, TRANSACTION_HASH_LENGTH / TRYTE_WIDTH)), @@ -93,7 +85,6 @@ export const createGetBalances = ({ send }: Provider) => send({ command: IRICommand.GET_BALANCES, addresses: addresses.map(removeChecksum), // Addresses passed to IRI should not have the checksum - threshold, ...(Array.isArray(tips) && tips.length && { tips }), }) ) diff --git a/packages/core/src/createGetInputs.ts b/packages/core/src/createGetInputs.ts index ce62b2d54..2bfc21ac4 100644 --- a/packages/core/src/createGetInputs.ts +++ b/packages/core/src/createGetInputs.ts @@ -38,11 +38,11 @@ const defaults: GetInputsOptions = { /** * @method createGetInputs - * + * * @summary Creates a new `getInputs()` method, using a custom Provider instance. * * @memberof module:core - * + * * @ignore * * @param {Provider} provider - The Provider object that the method should use to call the node's API endpoints. @@ -55,17 +55,17 @@ export const createGetInputs = (provider: Provider) => { /** * This method generates [addresses](https://docs.iota.org/docs/getting-started/0.1/clients/addresses) for a given seed and finds those that have a positive balance. - * + * * **Note:** The given seed is used to [generate addresses](https://docs.iota.org/docs/client-libraries/0.1/how-to-guides/js/generate-an-address) on your local device. It is never sent anywhere. - * + * * To find a certain amount of [IOTA tokens](https://docs.iota.org/docs/getting-started/0.1/clients/token) and return only the addresses that, when combined, contain that amount, pass it to the `options.threshold` argument. - * + * * ## Related methods - * + * * You may want to use this method to find inputs for the [`prepareTransfers()`]{@link #module_core.prepareTransfers} method. - * + * * @method getInputs - * + * * @summary Finds a seed's addresses that have a positive balance. * * @memberof module:core @@ -77,7 +77,7 @@ export const createGetInputs = (provider: Provider) => { * @paramĀ {number} [options.end] - The key index at which to stop generating addresses * @param {number} [options.threshold] - The amount of IOTA tokens that you want to find * @param {Callback} [callback] - Optional callback function - * + * * @example * * ```js @@ -104,7 +104,7 @@ export const createGetInputs = (provider: Provider) => { * - input.security: The security level of the address * - input.balance: The amount of IOTA tokens in the address * - inputs.totalBalance: The combined balance of all addresses - * + * * @reject {Error} error - An error that contains one of the following: * - `INVALID_SEED`: Make sure that the seed contains only trytes * - `INVALID_SECURITY_LEVEL`: Make sure that the security level is a number between 1 and 3 @@ -113,7 +113,7 @@ export const createGetInputs = (provider: Provider) => { * - Fetch error: The connected IOTA node's API returned an error. See the [list of error messages](https://docs.iota.org/docs/node-software/0.1/iri/references/api-errors) ` * - `INVALID_THRESHOLD`: Make sure that the threshold is a number greater than zero * - `INSUFFICIENT_BALANCE`: Make sure that the seed has addresses that contain IOTA tokens - * - Fetch error: The connected IOTA node's API returned an error. See the [list of error messages](https://docs.iota.org/docs/node-software/0.1/iri/references/api-errors) + * - Fetch error: The connected IOTA node's API returned an error. See the [list of error messages](https://docs.iota.org/docs/node-software/0.1/iri/references/api-errors) */ return (seed: Trytes, options: Partial = {}, callback?: Callback): Promise => { const { start, end, security, threshold } = getInputsOptions(options) @@ -123,7 +123,7 @@ export const createGetInputs = (provider: Provider) => { .then(newAddressOptions => getNewAddress(seed, newAddressOptions)) .then(allAddresses => asArray(allAddresses)) .then(allAddresses => - getBalances(allAddresses, 100) + getBalances(allAddresses) .then(({ balances }) => createInputsObject(allAddresses, balances, start, security)) .then(res => filterByThreshold(res, threshold)) .tap(inputs => hasSufficientBalance(inputs, threshold)) diff --git a/packages/core/test/integration/getBalances.test.ts b/packages/core/test/integration/getBalances.test.ts index ce046bafa..baefcd412 100644 --- a/packages/core/test/integration/getBalances.test.ts +++ b/packages/core/test/integration/getBalances.test.ts @@ -1,6 +1,6 @@ import { createHttpClient } from '@iota/http-client' import test from 'ava' -import { INVALID_ADDRESS, INVALID_THRESHOLD, INVALID_TRANSACTION_HASH } from '../../../errors' +import { INVALID_ADDRESS, INVALID_TRANSACTION_HASH } from '../../../errors' import { stringify } from '../../../guards' import { createGetBalances } from '../../src' import { balancesResponse, getBalancesCommand } from './nocks/getBalances' @@ -11,7 +11,7 @@ const addressesWithChecksum = getBalancesCommand.addresses.map(address => addres test('getBalances() resolves to correct balances response', async t => { t.deepEqual( - await getBalances(getBalancesCommand.addresses, getBalancesCommand.threshold), + await getBalances(getBalancesCommand.addresses), balancesResponse, 'getBalances() should resolve to correct balances' ) @@ -19,7 +19,7 @@ test('getBalances() resolves to correct balances response', async t => { test('getBalances() removes checksum from addresses', async t => { t.deepEqual( - await getBalances([...addressesWithChecksum], getBalancesCommand.threshold), + await getBalances([...addressesWithChecksum]), balancesResponse, 'getBalances() by addresses should remove checksum from addresses' ) @@ -28,7 +28,7 @@ test('getBalances() removes checksum from addresses', async t => { test('getBalances() does not mutate original addresses', async t => { const addresses = [...addressesWithChecksum] - await getBalances(addresses, 100) + await getBalances(addresses) t.deepEqual(addresses, addressesWithChecksum, 'getBalances() should not mutate original addresses') }) @@ -38,35 +38,28 @@ test('getBalances() rejects with correct errors for invalid input', t => { const invalidTips = [`m${'M'.repeat(80)}`] t.is( - t.throws(() => getBalances([...addressesWithChecksum], getBalancesCommand.threshold, invalidTips), Error) - .message, + t.throws(() => getBalances([...addressesWithChecksum], invalidTips), Error).message, `${INVALID_TRANSACTION_HASH}: ${stringify(invalidTips)}`, 'getBalances() should throw error for invalid tips' ) t.is( - t.throws(() => getBalances(invalidAddresses, getBalancesCommand.threshold), Error).message, + t.throws(() => getBalances(invalidAddresses), Error).message, `${INVALID_ADDRESS}: ${stringify(invalidAddresses)}`, 'getBalances() should throw error for invalid addresses' ) - - t.is( - t.throws(() => getBalances(getBalancesCommand.addresses, 101), Error).message, - `${INVALID_THRESHOLD}: 101`, - 'getBalances() should throw error for invalid threshold' - ) }) test.cb('getBalances() invokes callback when tips parameter is not provided', t => { - getBalances(getBalancesCommand.addresses, getBalancesCommand.threshold, undefined, t.end) + getBalances(getBalancesCommand.addresses, undefined, t.end) }) test.cb('getBalances() invokes callback when tips parameter is provided', t => { - getBalances(getBalancesCommand.addresses, getBalancesCommand.threshold, ['M'.repeat(81)], t.end) + getBalances(getBalancesCommand.addresses, ['M'.repeat(81)], t.end) }) test.cb('getBalances() passes correct arguments to callback when tips parameter is not provided', t => { - getBalances(getBalancesCommand.addresses, getBalancesCommand.threshold, undefined, (err, res) => { + getBalances(getBalancesCommand.addresses, undefined, (err, res) => { t.is(err, null, 'getBalances() should pass null as first argument in callback for successuful requests') t.deepEqual( @@ -80,7 +73,7 @@ test.cb('getBalances() passes correct arguments to callback when tips parameter }) test.cb('getBalances() passes correct arguments to callback when tips parameter is provided', t => { - getBalances(getBalancesCommand.addresses, getBalancesCommand.threshold, ['M'.repeat(81)], (err, res) => { + getBalances(getBalancesCommand.addresses, ['M'.repeat(81)], (err, res) => { t.is(err, null, 'getBalances() should pass null as first argument in callback for successuful requests') t.deepEqual( diff --git a/packages/core/test/integration/nocks/getBalances.ts b/packages/core/test/integration/nocks/getBalances.ts index bac97c710..a18d14f56 100644 --- a/packages/core/test/integration/nocks/getBalances.ts +++ b/packages/core/test/integration/nocks/getBalances.ts @@ -10,7 +10,6 @@ import headers from './headers' export const getBalancesCommand: GetBalancesCommand = { command: IRICommand.GET_BALANCES, addresses, - threshold: 100, } export const getBalancesCommandWithTips: GetBalancesCommand = { ...getBalancesCommand, tips: ['M'.repeat(81)] } diff --git a/packages/core/test/integration/nocks/prepareTransfers.ts b/packages/core/test/integration/nocks/prepareTransfers.ts index 642ecdb7a..3d812275c 100644 --- a/packages/core/test/integration/nocks/prepareTransfers.ts +++ b/packages/core/test/integration/nocks/prepareTransfers.ts @@ -6,7 +6,6 @@ import headers from './headers' export const getBalancesCommand: GetBalancesCommand = { command: IRICommand.GET_BALANCES, addresses, - threshold: 100, } const getBalancesResponse: GetBalancesResponse = { diff --git a/packages/guards.ts b/packages/guards.ts index b4e6be29b..a5d797ccf 100644 --- a/packages/guards.ts +++ b/packages/guards.ts @@ -332,12 +332,6 @@ export const getInputsThresholdValidator: Validator = threshold => [ errors.INVALID_THRESHOLD, ] -export const getBalancesThresholdValidator: Validator = threshold => [ - threshold, - t => Number.isInteger(t) && t <= 100, - errors.INVALID_THRESHOLD, -] - export const stringify = (value: any) => { - return JSON.stringify(value, null, 1) -} \ No newline at end of file + return JSON.stringify(value, null, 1) +} diff --git a/packages/http-client/test/batchedSend.ts b/packages/http-client/test/batchedSend.ts index dd4f056c6..ee46831e9 100644 --- a/packages/http-client/test/batchedSend.ts +++ b/packages/http-client/test/batchedSend.ts @@ -134,19 +134,16 @@ export const getTrytesNockBatchB = nock('http://localhost:24265', headers(apiVer export const getBalancesCommand: GetBalancesCommand = { command: IRICommand.GET_BALANCES, addresses: ['A'.repeat(81), 'B'.repeat(81), 'C'.repeat(81)], - threshold: 100, } export const getBalancesCommandA: GetBalancesCommand = { command: IRICommand.GET_BALANCES, addresses: ['A'.repeat(81), 'B'.repeat(81)], - threshold: 100, } export const getBalancesCommandB: GetBalancesCommand = { command: IRICommand.GET_BALANCES, addresses: ['C'.repeat(81)], - threshold: 100, } export const expectedGetBalancesResponse: GetBalancesResponse = { diff --git a/packages/http-client/test/isBatchableCommand.test.ts b/packages/http-client/test/isBatchableCommand.test.ts index ba9b3fdd3..3375f049f 100644 --- a/packages/http-client/test/isBatchableCommand.test.ts +++ b/packages/http-client/test/isBatchableCommand.test.ts @@ -22,7 +22,6 @@ const getTrytesCommand: GetTrytesCommand = { const getBalancesCommand: GetBalancesCommand = { command: IRICommand.GET_BALANCES, addresses: ['A'.repeat(81), 'B'.repeat(81)], - threshold: 100, } const getInclusionStatesCommand: GetInclusionStatesCommand = { diff --git a/packages/multisig/src/multisig.ts b/packages/multisig/src/multisig.ts index 3ce153c91..6f80180f1 100644 --- a/packages/multisig/src/multisig.ts +++ b/packages/multisig/src/multisig.ts @@ -240,7 +240,7 @@ export default class Multisig { .then((sanitizedTransfers: ReadonlyArray) => input.balance ? createBundle(input, sanitizedTransfers, remainderAddress) - : (createGetBalances(this.provider) as any)([input.address], 100) + : (createGetBalances(this.provider) as any)([input.address]) .then( (res: Balances): MultisigInput => ({ ...input, diff --git a/packages/types.ts b/packages/types.ts index ce72d2f1d..dc74b5147 100644 --- a/packages/types.ts +++ b/packages/types.ts @@ -166,7 +166,6 @@ export interface FindTransactionsResponse { export interface GetBalancesCommand extends BaseCommand { readonly command: string readonly addresses: ReadonlyArray - readonly threshold: number readonly tips?: ReadonlyArray }