Skip to content

fix(#500): avoid double-conversion in unlockAssets wrapper - #507

Merged
ritaifeoluwa merged 1 commit into
SmartDropLabs:mainfrom
Hotmopo:fix/500-unlockassets-double-conversion
Oct 1, 2026
Merged

ritaifeoluwa merged 1 commit into
SmartDropLabs:mainfrom
Hotmopo:fix/500-unlockassets-double-conversion

Conversation

@Hotmopo

@Hotmopo Hotmopo commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

The unlockAssets wrapper was validating the amount by calling amountToStroops() and discarding the result, then the service would call amountToStroops() again for the actual conversion.

Now the wrapper captures the converted stroops value and passes it to the service via a new optional amountStroops parameter, avoiding the redundant conversion while maintaining fail-fast validation before wallet interaction.

Closes #500

The unlockAssets wrapper was validating the amount by calling amountToStroops()
and discarding the result, then the service would call amountToStroops() again
for the actual conversion. Now the wrapper captures the converted stroops value
and passes it to the service via a new optional parameter, avoiding the
redundant conversion while maintaining fail-fast validation before wallet
interaction.

Closes SmartDropLabs#500
@drips-wave

drips-wave Bot commented Oct 1, 2026

Copy link
Copy Markdown

@Hotmopo Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@netlify

netlify Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for spiffy-melomakarona-eb1e8a failed.

Name Link
🔨 Latest commit df55d48
🔍 Latest deploy log https://app.netlify.com/projects/spiffy-melomakarona-eb1e8a/deploys/6abe812b31d82500084b5f2f

@netlify

netlify Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for smart-drop failed.

Name Link
🔨 Latest commit df55d48
🔍 Latest deploy log https://app.netlify.com/projects/smart-drop/deploys/6abe812b8e390a00085e586f

@ritaifeoluwa
ritaifeoluwa merged commit 02de9bc into SmartDropLabs:main Oct 1, 2026
0 of 8 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.

[bug] unlockAssets wrapper double-converts amount to stroops

2 participants