Skip to content
This repository has been archived by the owner on Sep 6, 2024. It is now read-only.

feat: remove threshold parameter from getBalances() #481

Merged
merged 2 commits into from
Jun 14, 2020

Conversation

laumair
Copy link
Contributor

@laumair laumair commented Jun 8, 2020

IRI removes support for threshold parameter in version 1.8.6.

This PR removes the usage of threshold parameter from the lib.

Related: iotaledger/iri#1851 & #463

Description of change

Please write a summary of your changes and why you made them. Be sure to reference any related issues by adding fixes # (issue).

Type of change

Choose a type of change, and delete any options that are not relevant.

  • Bug fix (a non-breaking change which fixes an issue)
  • Enhancement (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Fix

How the change has been tested

Tested with following:

const Iota = require('@iota/core');

const iotaHornet = Iota.composeAPI({
    provider: 'https://node02.iotatoken.nl:443'
});

const address = 'EQSAUZXULTTYZCLNJNTXQTQHOMOFZERHTCGTXOLTVAHKSA9OGAZDEKECURBRIXIJWNPFCQIOVFVVXJVD9';
const tip = 'ZBWRPCGROKIWVQZIZUGGJEGECNXXPEAKLWUAVARPTGLRPCKRQVVALOXWUVGFOC9ITRDSBRUQCAM9Z9999';

iotaHornet.getBalances([
    address
], [tip]).then(console.log).catch(console.log);

const iotaIri = Iota.composeAPI({
    provider: 'https://nodes.iota.cafe:443'
});

iotaIri.getBalances([
    address
], [tip]).then(console.log).catch(console.log);

Outputs:

{ balances: [ 79 ],
  references:
   [ 'KSKUWYTMDSLNUFUQHYYCEQBWTZCF9CTMBLCXEGCGHAX9ETBSZRUHOTMACVYCYD9Q9RONIMWBDXFB99999' ],
  milestoneIndex: 1443659,
  duration: 0 }
{ balances: [ 79 ],
  references:
   [ 'ZBWRPCGROKIWVQZIZUGGJEGECNXXPEAKLWUAVARPTGLRPCKRQVVALOXWUVGFOC9ITRDSBRUQCAM9Z9999' ],
  milestoneIndex: 1443659,
  duration: 1 }

Change checklist

Add an x to the boxes that are relevant to your changes, and delete any items that are not.

  • [] My code follows the contribution guidelines for this project
  • [] I have performed a self-review of my own code
  • [] I have commented my code, particularly in hard-to-understand areas
  • [] I have made corresponding changes to the documentation
  • [] I have added tests that prove my fix is effective or that my feature works
  • [] New and existing unit tests pass locally with my changes

laumair added 2 commits June 8, 2020 16:45
IRI removes support for threshold parameter in version [1.8.6](iotaledger/iri#1768).

This PR removes the usage of threshold parameter from the lib.

Related: iotaledger/iri#1851
@laumair laumair added C - core L - Awaiting reviews Lifecycle - Each PR must have at least 2 reviewers P2 - High Priority - Prefer to fix or merge this labels Jun 14, 2020
@laumair laumair marked this pull request as ready for review June 14, 2020 02:10
@laumair laumair requested a review from rajivshah3 June 14, 2020 02:10
@laumair laumair merged commit 47fd710 into iotaledger:next Jun 14, 2020
@laumair laumair deleted the feat/get-balances-threshold branch June 14, 2020 02:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
L - Awaiting reviews Lifecycle - Each PR must have at least 2 reviewers P2 - High Priority - Prefer to fix or merge this
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants