yearn / yearn-sdk

🦧 SDK for the yearn.finance platform. WIP
https://npm.im/@yfi/sdk
MIT License
53 stars 56 forks source link

feat: Custom Zap Withdraw Simulations on SDK [WEB-1475] #286

Closed karelianpie closed 2 years ago

karelianpie commented 2 years ago

Description

Simulations should support any custom zap withdraw transaction

Related Issue

WEB-1475 (subtask of WEB-1011)

Motivation and Context

Users know expected transaction outcome for any type of transaction

How Has This Been Tested?

Yalc'ed the SDK into the FE and did a few withdraw simulations, screenshots attached

Added tests:

Screenshots (if appropriate):

When it's the underlying token, directWithdraw:

Screen Shot 2022-05-04 at 6 23 33 pm

When it's ETH it's just a normal zapperZapOut

Screen Shot 2022-05-04 at 6 24 24 pm

just like wbtc (zapperZapOut)

Screen Shot 2022-05-04 at 6 26 04 pm

Labs (yvBoost)

Screen Shot 2022-05-04 at 6 31 05 pm
linear[bot] commented 2 years ago

WEB-1475 Custom Zap Withdraw Simulations on SDK

github-actions[bot] commented 2 years ago

size-limit report 📦

Path Size
dist/sdk.cjs.production.min.js 46.54 KB (+0.66% 🔺)
dist/sdk.esm.js 46.97 KB (+0.77% 🔺)
xgambitox commented 2 years ago

Great job @karelianpie !