Skip to content

Commit

Permalink
Remove unecessary isFeeProccessed logic
Browse files Browse the repository at this point in the history
We no longer need to process multiple txs to accurately get fees for sending funds
  • Loading branch information
Jon-edge committed Sep 5, 2024
1 parent ca9387b commit 8a265c2
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/fio/FioEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2170,9 +2170,6 @@ export const parseAction = ({
name: isUnstakeRewardTx ? 'unstakefio' : otherParams.name
}

if (otherParams.meta.isFeeProcessed != null) {
return { blockNum: action.block_num }
}
if (otherParams.meta.isTransferProcessed != null) {
if (data.to !== actor) {
nativeAmount = sub(existingTx.nativeAmount, networkFee)
Expand All @@ -2181,12 +2178,10 @@ export const parseAction = ({
}
} else {
throw new Error(
'processTransaction error - existing spend transaction should have isTransferProcessed or isFeeProcessed set'
'processTransaction error - existing spend transaction should have isTransferProcessed set'
)
}
}

otherParams.meta.isFeeProcessed = true
}
break

Expand Down

0 comments on commit 8a265c2

Please sign in to comment.