Adding support for *default fee paying asset* in ApplicationApi#3540
Adding support for *default fee paying asset* in ApplicationApi#3540sschiessl-bcp merged 7 commits intobitshares:developfrom
Conversation
User had reported that *feeAsset* is turning into *liquidity pool asset* while attempting to perform withdraw from a liquidity pool, seems bug is effecting objects.feeAsset.get("id") default object at liquidity pools withdraw *modal* which should show feeAsset as core asset.
I know what you mean hence for now mostly people are paying liquidity pools transaction fees in BTS. I am considering this: #3001 (comment) I believe its ready but will need to check the bug @sschiessl-bcp is referring to. |
|
@sschiessl-bcp please pass this for now as some users are not able to pay fees with BTS. Note: this change is effecting only liquidity removal operation of liquidity pool transaction fees. |
|
Actually I think we should extend the fix in #3492 to all operations: call |
|
Hello @sschiessl-bcp; I'd just checked and such a change would require complex work, for now please merge this fix as it's preventing some liquidity pool users to pay with BTS. Perhaps another feature implementation like this open case be created later #3088 |
|
@ioBanker see my comment #3540 (comment)
Don't merge this. Please fix it. |
Fixed and was tested. Credits to @thontron for tests |
|
accountUtils.getFinalFeeAsset(account,"liquidity_pool_withdraw") is successfully working It can be merged now. |
sschiessl-bcp
left a comment
There was a problem hiding this comment.
Looking at the actual code change, I see the following:
In ApplicationAPI you define
bitshares-ui/app/api/ApplicationApi.js
Lines 989 to 996 in 9e4d1d8
but when calling it you are using
bitshares-ui/app/components/Modal/PoolStakeModal.jsx
Lines 110 to 120 in 9e4d1d8
Please fix the function arguments and implement the fix according to
, which has the proper fallback options. Is this maybe the same for deposit?
Good catch; liquidityPoolWithdraw arguments are wrong as assetA and assetB shouldn't be mentioned for this operation unlike deposit, will fix this soon later. |
|
Below operations execution should be tested while setting a different asset "that has BTS in fee pool" prior merging this: account_create |
|
transfer - Tested I'd merged this change into dex.iobanker.com , please help with testing the other operations. |
|
I've changed the behavior to "if fee asset given, then use this, if not, use getFinalFeeAsset" |
| if (!feeAsset) { | ||
| // use default fee asset selection if none given | ||
| feeAsset = accountUtils.getFinalFeeAsset( | ||
| from, |
…hares#3540) * Fixing bug in liquidity pools withdraw operation User had reported that *feeAsset* is turning into *liquidity pool asset* while attempting to perform withdraw from a liquidity pool, seems bug is effecting objects.feeAsset.get("id") default object at liquidity pools withdraw *modal* which should show feeAsset as core asset. * Use getFinalFeeAsset to determine FeeAsset in LP * Update ApplicationApi.js * Update ApplicationApi.js * Update ApplicationApi.js * Update ApplicationApi.js * fix: honor given fee asset choices with getFinalFeeAsset as fallback Co-authored-by: Stefan <[email protected]>

User had reported that feeAsset is turning into liquidity pool asset while attempting to perform withdraw from a liquidity pool, seems bug is effecting objects.feeAsset.get("id") default object at liquidity pools withdraw modal which should show feeAsset as core asset.
Before fixing the bug:
After fixing the bug: