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

test(bouncer): add test for new utility #5324

Merged
merged 6 commits into from
Oct 11, 2024
Merged

Conversation

acdibble
Copy link
Contributor

@acdibble acdibble commented Oct 9, 2024

Pull Request

Closes: WEB-1499

Summary

To enable integrators to more securely submit extrinsics to open swap deposit channels outside of the broker API, I created a helper that will go in the SDK that will return the parameters properly formatted for them, ready for submission with the Polkadot API.

This adds a test that ensures that the parameters that are generated by the utility submit the extrinsic to the state chain successfully and open channels with the expected attributes.

Also there are some type fixes (I can't help myself).

@@ -32,6 +32,7 @@ const getCachedDisposable = <T extends AsyncDisposable, F extends (...args: any[
get(target, prop, receiver) {
if (prop === Symbol.asyncDispose) {
return () => {
connections -= 1;
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 accidentally removed this months ago?

Copy link

codecov bot commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71%. Comparing base (ab7104b) to head (b0b7f57).
Report is 3 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff           @@
##            main   #5324    +/-   ##
======================================
- Coverage     71%     71%    -0%     
======================================
  Files        488     488            
  Lines      84898   84762   -136     
  Branches   84898   84762   -136     
======================================
- Hits       60376   60185   -191     
- Misses     21822   21874    +52     
- Partials    2700    2703     +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines +45 to +49
{
refundAddress: '0xa56A6be23b6Cf39D9448FF6e897C29c41c8fbDFF',
minPriceX128: '1',
retryDurationBlocks: 100,
}, // FoK parameters
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the SDK requires FoK parameters now for any DCA swap

Copy link
Contributor

@j4m1ef0rd j4m1ef0rd left a comment

Choose a reason for hiding this comment

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

Some of it is above my level of TS understanding but lgtm.

@acdibble acdibble enabled auto-merge October 10, 2024 15:45
@acdibble acdibble added this pull request to the merge queue Oct 11, 2024
Merged via the queue into main with commit 73b2773 Oct 11, 2024
49 checks passed
@acdibble acdibble deleted the test/test-extrinsic-params branch October 11, 2024 10:01
syan095 added a commit that referenced this pull request Oct 14, 2024
…lana-ccm

* origin/main:
  ci: upgrade action version to supress deprecation warnings ⚙️ (#5330)
  feat: handle rotation tx construction failures (#5307)
  test(bouncer): add test for new utility (#5324)
  fix: keyholder check should use `HistoricalActiveEpochs` (#5325)
  feat: BTC contract swap encoding (#5311)
dandanlen pushed a commit that referenced this pull request Oct 30, 2024
* test(bouncer): add test for new utility

* run test

* add dca params

* change logs

* code review suggestion

* call function
dandanlen pushed a commit that referenced this pull request Oct 31, 2024
* test(bouncer): add test for new utility

* run test

* add dca params

* change logs

* code review suggestion

* call function
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.

3 participants