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

[MEX-410] position creator with EGLD #1263

Merged

Conversation

claudiulataretu
Copy link
Collaborator

Reasoning

  • position creator transactions with EGLD and single token have different behaviour between consolidation of a position or create a new one

Proposed Changes

  • add wrap EGLD only for position creator transactions with position consolidate
  • use value for position transactions with EGLD and no consolidation

How to test

query CreateStakingPositionSingleToken {
	createStakingPositionSingleToken(
		stakingAddress: <staking_address>,
		payments: [{
 			amount: "1000000000000000000",
 			nonce: 0,
 			tokenID: "EGLD"
		}],
		tolerance: 0.01
	) {
		receiver
		value
		data
	}
}
  • query should return one transaction with value
query CreateStakingPositionSingleToken {
	createStakingPositionSingleToken(
		stakingAddress: <stake_address>,
		payments: [{
 			amount: "1000000000000000000",
 			nonce: 0,
 			tokenID: "EGLD"
		},
		{
 			amount: "1000000000000000000",
 			nonce: <nonce>,
 			tokenID: <farm_stake_token_id>
		}],
		tolerance: 0.01
	) {
		receiver
		value
		data
	}
}
  • query should return 2 transactions with EGLD wrap

Copy link

codecov bot commented Jan 19, 2024

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (6f40415) 56.67% compared to head (9e75d3a) 56.69%.
Report is 1 commits behind head on feat/xexchange-v3.

Files Patch % Lines
...n-creator/services/position.creator.transaction.ts 77.77% 0 Missing and 6 partials ⚠️
Additional details and impacted files
@@                  Coverage Diff                  @@
##           feat/xexchange-v3    #1263      +/-   ##
=====================================================
+ Coverage              56.67%   56.69%   +0.02%     
=====================================================
  Files                    242      242              
  Lines                   8583     8592       +9     
  Branches                 612      614       +2     
=====================================================
+ Hits                    4864     4871       +7     
+ Misses                  3187     3184       -3     
- Partials                 532      537       +5     
Flag Coverage Δ
unittests 56.69% <77.77%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@claudiulataretu claudiulataretu merged commit 12f0601 into feat/xexchange-v3 Jan 22, 2024
3 checks passed
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