Skip to content

Add balance transfer API#70

Merged
PierreBesson merged 9 commits intomainfrom
balance-transfers
May 10, 2023
Merged

Add balance transfer API#70
PierreBesson merged 9 commits intomainfrom
balance-transfers

Conversation

@PierreBesson
Copy link
Contributor

@PierreBesson PierreBesson commented May 3, 2023

Also automatically adds the right number of decimals per UNIT.

Remark: docker tests are broken but the issue is also affecting the main branch.

@PierreBesson PierreBesson force-pushed the balance-transfers branch 5 times, most recently from d045ee7 to 4a33b14 Compare May 4, 2023 12:39
@PierreBesson PierreBesson requested a review from BulatSaif May 5, 2023 15:10
Copy link

@BulatSaif BulatSaif left a comment

Choose a reason for hiding this comment

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

All good, just small fixes needed

}
)
# If the batch contains only 1 element, don't use batch
if len(batch_call) == 1:

Choose a reason for hiding this comment

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

it is better to keep batch or non-batch if the condition on the calling side since events/errors returned by batch and just call are different.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I introduced this because in teleport_funds you had put this logic. So I simply moved it to substrate_batchall_call. Since we are wrapping transfer/teleport calls with this batch method, I think it's better to remove the batch when there is only 1 operation.

PierreBesson and others added 2 commits May 10, 2023 11:51
@PierreBesson PierreBesson merged commit 4cb5ef9 into main May 10, 2023
@PierreBesson PierreBesson deleted the balance-transfers branch May 10, 2023 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants