Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(ae): remove stamps and migrate to TypeScript #1547

Merged
merged 1 commit into from
Jun 13, 2022

Conversation

Kalovelo
Copy link
Collaborator

@Kalovelo Kalovelo commented Jun 3, 2022

based on #1510, closes #1517

As you can see, some stamps have been left (NodePool, AccountResolver, ContractCompilerHttp, AccountMultiple) because they are removed in pending PRs (#1522, #1523)

@lgtm-com
Copy link

lgtm-com bot commented Jun 3, 2022

This pull request introduces 1 alert and fixes 11 when merging 756bb32 into 5c74af3 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

fixed alerts:

  • 11 for Superfluous trailing arguments

@lgtm-com
Copy link

lgtm-com bot commented Jun 3, 2022

This pull request introduces 1 alert and fixes 11 when merging dfbd1f9 into 5c74af3 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

fixed alerts:

  • 11 for Superfluous trailing arguments

src/ae/index.ts Outdated
const instanceOptions = {
...this.Ae.defaults,
onNode: this.selectedNode.instance,
instance: this,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instance shouldn't be passed here

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is with onAccount. Basically, there are cases where onAccount has a different value, for example in the transferFunds test: https://github.com/aeternity/aepp-sdk-js/blob/develop/test/integration/accounts.js#L103

onAccount is a reserved word. Therefore, when in need to call this functions inside transferFunds, error occurs.

A workaround is to use a different keyword, thus instance.

src/chain.ts Outdated Show resolved Hide resolved
src/chain.ts Outdated Show resolved Hide resolved
src/chain.ts Outdated Show resolved Hide resolved
src/chain.ts Outdated Show resolved Hide resolved
src/tx/index.ts Outdated Show resolved Hide resolved
src/utils/errors.ts Outdated Show resolved Hide resolved
test/integration/chain.js Outdated Show resolved Hide resolved
test/integration/chain.js Outdated Show resolved Hide resolved
@lgtm-com
Copy link

lgtm-com bot commented Jun 8, 2022

This pull request fixes 11 alerts when merging c78475d into 0b6b9bb - view on LGTM.com

fixed alerts:

  • 11 for Superfluous trailing arguments

@lgtm-com
Copy link

lgtm-com bot commented Jun 8, 2022

This pull request fixes 11 alerts when merging 728b828 into 0b6b9bb - view on LGTM.com

fixed alerts:

  • 11 for Superfluous trailing arguments

@davidyuk davidyuk force-pushed the develop branch 2 times, most recently from 0810699 to 6d5b7bd Compare June 10, 2022 12:03
@Kalovelo Kalovelo force-pushed the feature/ts-ae branch 3 times, most recently from 7c71254 to 95b3277 Compare June 10, 2022 14:56
@lgtm-com
Copy link

lgtm-com bot commented Jun 10, 2022

This pull request introduces 2 alerts and fixes 1 when merging 95b3277 into 6d5b7bd - view on LGTM.com

new alerts:

  • 2 for Unused variable, import, function or class

fixed alerts:

  • 1 for Superfluous trailing arguments

@Kalovelo
Copy link
Collaborator Author

@davidyuk updated & rebased, only issue is with 2 specific test cases revoke names & transfers names where I get a unique error: RestError: v3/transactions/th_2wB71ez... error: Transaction not found

BREAKING CHANGE: `name.update`, `name.revoke` doesn't accept account as string anymore
Pass an instance of AccountBase to `onAccount` option instead.
@davidyuk davidyuk marked this pull request as ready for review June 13, 2022 04:08
Copy link
Member

@davidyuk davidyuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reverted oracle changes, will merge them separately

@davidyuk davidyuk merged commit 662128f into aeternity:develop Jun 13, 2022
@davidyuk davidyuk deleted the feature/ts-ae branch June 13, 2022 04:15
@lgtm-com
Copy link

lgtm-com bot commented Jun 13, 2022

This pull request introduces 4 alerts when merging 8ed55d0 into cdb95d4 - view on LGTM.com

new alerts:

  • 3 for Syntax error
  • 1 for Unused variable, import, function or class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate ae module to TS
2 participants