Skip to content

Commit f02a591

Browse files
authored
fix(docs): fix FAssets redemption steps by removing approval mention (#751)
1 parent 947965f commit f02a591

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

docs/fassets/developer-guides/7-fassets-redeem.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ The following example demonstrates how to redeem FAssets using the `AssetManager
3232
### Code Breakdown
3333

3434
1. Define the asset manager contract address to interact with it.
35-
2. Approve FAssets (FXRP) tokens for redemption.
36-
3. Redeem the FAssets using the [`redeem`](/fassets/reference/IAssetManager#redeem) function by specifying the number of lots to redeem and the underlying chain address.
37-
4. Retrieve the asset manager settings to calculate the redeemed amount; for this, you need to obtain the `lotSizeAMG` and `assetDecimals` from the asset manager settings [document](/fassets/developer-guides/fassets-settings-solidity).
35+
2. Redeem the FAssets using the [`redeem`](/fassets/reference/IAssetManager#redeem) function by specifying the number of lots to redeem and the underlying chain address.
36+
3. Retrieve the asset manager settings to calculate the redeemed amount; for this, you need to obtain the `lotSizeAMG` and `assetDecimals` from the asset manager settings [document](/fassets/developer-guides/fassets-settings-solidity).
3837

3938
:::info
4039
In this example, you are not using the executor vault address, but you can use it to redeem FAssets on behalf of another address.

examples/developer-hub-solidity/FAssetsRedeem.sol

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,7 @@ contract FAssetsRedeem {
1717
fAssetToken = _fAssetToken;
1818
}
1919

20-
// 2. Approve FAssets for redemption
21-
function approveFAssets(uint256 _amount) public returns (bool) {
22-
return IERC20(fAssetToken).approve(address(this), _amount);
23-
}
24-
25-
// 3. Redeem FAssets (requires prior approval)
20+
// 2. Redeem FAssets (requires prior approval)
2621
function redeem(
2722
uint256 _lots,
2823
string memory _redeemerUnderlyingAddressString
@@ -47,7 +42,7 @@ contract FAssetsRedeem {
4742
return redeemedAmountUBA;
4843
}
4944

50-
// 4. Get the AssetManager settings
45+
// 3. Get the AssetManager settings
5146
function getSettings()
5247
public
5348
view

0 commit comments

Comments
 (0)