From 150f9fe705f617a9c36b6a0c7658dd4ed76da082 Mon Sep 17 00:00:00 2001 From: anlerkan Date: Fri, 15 Sep 2023 14:01:10 +0300 Subject: [PATCH 1/2] fix(generateWidgetIframeUrl): send platform fee fields even if they are not provided together --- src/WidgetController.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/WidgetController.ts b/src/WidgetController.ts index a42364e..097e3a7 100644 --- a/src/WidgetController.ts +++ b/src/WidgetController.ts @@ -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); } From 2d2f9895fc91970d11fb56b7d23b0731d99c297f Mon Sep 17 00:00:00 2001 From: anlerkan Date: Mon, 18 Sep 2023 12:09:04 +0300 Subject: [PATCH 2/2] bump up package version --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3a41fbf..cfeb71e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@tinymanorg/tinyman-swap-widget-sdk", - "version": "1.0.3", + "version": "1.0.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@tinymanorg/tinyman-swap-widget-sdk", - "version": "1.0.3", + "version": "1.0.4", "license": "ISC", "dependencies": { "@tinymanorg/tinyman-js-sdk": "^3.0.0", diff --git a/package.json b/package.json index f447cd8..5063490 100644 --- a/package.json +++ b/package.json @@ -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",