Skip to content

Commit e6b51c2

Browse files
committed
refactor(FAssets): optimize pool token suffix hash calculation in AssetManagerRegistry
1 parent fba9c07 commit e6b51c2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/developer-hub-solidity/FAssetsAssetManagerRegistry.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ contract AssetManagerRegistry {
3333
AssetManagerSettings.Data memory settings = assetManager
3434
.getSettings();
3535

36+
// Calculate the hash of the pool token suffix
37+
bytes32 poolTokenSuffixHash = keccak256(abi.encodePacked(poolTokenSuffix));
38+
3639
//8. return the address of the asset manager that has the pool token suffix "TXRP"
37-
if (
38-
keccak256(abi.encodePacked(settings.poolTokenSuffix)) ==
39-
TXRP_HASH
40-
) {
40+
if (poolTokenSuffixHash == TXRP_HASH) {
4141
return address(assetManager);
4242
}
4343
}

0 commit comments

Comments
 (0)