Repository navigation
fix(defindex-adapter): authorize deposit and withdraw auth - #1173
collinsezedike merged 2 commits into
Conversation
|
@ibochivincent-lang is attempting to deploy a commit to the Collins' projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@ibochivincent-lang 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! 🚀 |
collinsezedike
left a comment
There was a problem hiding this comment.
This fixes the deposit path only. #1128 also requires the withdraw burn path to register the nested token authorization, with a test that exercises it. Please add the withdraw fix and a withdraw auth-tree test. The Soroban job also fails on cargo fmt --check, so run cargo fmt --all.
| let min_amount = min_after_slippage(amount).unwrap_or_else(|e| panic_with_error!(&env, e)); | ||
|
|
||
| let usdc = get_usdc(&env); | ||
| env.authorize_as_current_contract(vec![ |
There was a problem hiding this comment.
This covers deposit. The withdraw path at lib.rs:243 still calls DeFindex's withdraw without the equivalent nested authorization, and no withdraw auth-tree test exercises it.
collinsezedike
left a comment
There was a problem hiding this comment.
@ibochivincent-lang thank you for the update. The withdraw authorization and auth-tree coverage are in place and all required checks pass. Please consider picking up another open issue.
|
Thank you for the contribution, @ibochivincent-lang; if the project is useful to you, starring the repository would help it reach more people. |
Summary
env.authorize_as_current_contract.usdc.transfer(adapter, dfx, amount)pull.withdrawburn of the adapter's dfTokens.mock_all_auths_allowing_non_root_auth.Closes #1128