Skip to content

Commit

Permalink
refactor: ref
Browse files Browse the repository at this point in the history
Signed-off-by: Mario Francia <[email protected]>
  • Loading branch information
M-Francia committed Nov 6, 2024
1 parent afb6086 commit aeff388
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions contracts/test/customFees.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ describe('Custom Fees Tests', function () {
console.log(result)
expect(result).to.be.true

// TODO: update
// const customFees = await getTokenCustomFees(
// proxyAddress,
// operatorClient
Expand Down
9 changes: 3 additions & 6 deletions sdk/src/domain/context/fee/CustomFee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,10 @@ export function fromHCustomFeeToSCFee(
fee.denominatingTokenId.toString() != '0.0.0'
? fee.denominatingTokenId.toSolidityAddress()
: EVM_ZERO_ADDRESS;
const useHbarsForPayment = tokenId == EVM_ZERO_ADDRESS ? true : false;
const useHbarsForPayment = tokenId === EVM_ZERO_ADDRESS;
const useCurrentTokenForPayment =
useHbarsForPayment == true
? false
: fee.denominatingTokenId!.toString() === currentTokenId
? true
: false;
!useHbarsForPayment &&
fee.denominatingTokenId?.toString() === currentTokenId;

return new SC_FixedFee(
amount,
Expand Down

0 comments on commit aeff388

Please sign in to comment.