Skip to content

Commit

Permalink
Merge pull request #5 from tinymanorg/fix/send-platform-fee-fields-ev…
Browse files Browse the repository at this point in the history
…en-if-they-are-not-provided-together

Send platform fee fields even if they are not provided together
  • Loading branch information
Anlerkan authored Sep 18, 2023
2 parents d8c0213 + 2d2f989 commit adaa226
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tinymanorg/tinyman-swap-widget-sdk",
"version": "1.0.3",
"version": "1.0.4",
"description": "Easily integrate Tinyman Swap Widget into your dApp with JavaScript SDK.",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down
5 changes: 4 additions & 1 deletion src/WidgetController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,11 @@ export class WidgetController {
searchParams[SwapWidgetSearchParamKey.ASSET_OUT] = String(assetIds[1]);
}

if (platformFeeAccount && platformFeePercentage) {
if (platformFeeAccount) {
searchParams[SwapWidgetSearchParamKey.PLATFORM_FEE_ACCOUNT] = platformFeeAccount;
}

if (platformFeePercentage) {
searchParams[SwapWidgetSearchParamKey.PLATFORM_FEE_PERCENTAGE] =
String(platformFeePercentage);
}
Expand Down

0 comments on commit adaa226

Please sign in to comment.