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

Typescript, array of parameters for an Atomic Transaction without any type assigned #409

Closed
BubsLB opened this issue Jul 9, 2021 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@BubsLB
Copy link

BubsLB commented Jul 9, 2021

Describe the bug

Hello,
I'm using typescript for create a script, and if I'm going to declare an array of parameters for an Atomic Transaction, so composed by heterogeneous types I need to specify any as type for the array, if I don't specify anything, it returns the following error.

Schermata 2021-07-09 alle 10 01 45

Expected Behavior

Should works without any type assigned

Current Behavior

Possible Solution

Steps to Reproduce

Environment

  • OS: iOS 11.4
  • Node.js version: 14.17.0
  • algob version: 1.1.0
@BubsLB BubsLB added the bug Something isn't working label Jul 9, 2021
@amityadav0
Copy link
Contributor

Hi
could you please try with const atomicTransaction: rtypes.ExecParams[] type ?
you can import it using import { rtypes } from '@algorand-builder/runtime';.

https://algobuilder.dev/api/runtime/modules/types.html

@BubsLB
Copy link
Author

BubsLB commented Jul 9, 2021

Hi
could you please try with const atomicTransaction: rtypes.ExecParams[] type ?
you can import it using import { rtypes } from '@algorand-builder/runtime';.

https://algobuilder.dev/api/runtime/modules/types.html

Hi, now it works, but I've another problem on changing the "fromAccount" in the lines below, because the property fromAccount doesn't exist in ExecParams. I changed it in 'fromAccountAddr = bob.addr;'

Schermata 2021-07-09 alle 15 46 42

Schermata 2021-07-09 alle 15 48 30

Is it correct ?

@amityadav0
Copy link
Contributor

yes, you are right. you should be able to change using fromAccount. checking the cause

This was referenced Jul 9, 2021
@robert-zaremba
Copy link
Member

The fix is backported to master and released in v1.1.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants