Skip to content

Commit

Permalink
fix swap-pool fee estimation
Browse files Browse the repository at this point in the history
  • Loading branch information
shrpne committed Apr 13, 2022
1 parent 896f2a4 commit 9aa42d3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion composables/use-fee.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ function cleanObject(txParams) {
for (const key in txParams) {
if (isEmpty(txParams[key])) {
clean[key] = undefined;
} else if (typeof txParams[key] === 'object') {
} else if (isObject(txParams[key])) {
clean[key] = cleanObject(txParams[key]);
} else {
clean[key] = txParams[key];
Expand All @@ -245,4 +245,8 @@ function cleanObject(txParams) {
function isEmpty(value) {
return value === '' || value === null;
}

function isObject(value) {
return Object.prototype.toString.call(value) === '[object Object]';
}
}

0 comments on commit 9aa42d3

Please sign in to comment.