Skip to content

Commit 46e773d

Browse files
committed
feat: updated testnet slpx getTokenConversion
1 parent aae3718 commit 46e773d

3 files changed

Lines changed: 3 additions & 13 deletions

File tree

.DS_Store

8 KB
Binary file not shown.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "slpx-sdk",
33
"type": "module",
4-
"version": "0.0.14",
4+
"version": "0.0.15",
55
"main": "./dist/index.cjs",
66
"module": "./dist/index.js",
77
"types": "./dist/index.d.ts",

src/slpx-testnet.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,6 @@ export function getTestnetRedeemParams(
197197
export function getTestnetConversionParams(
198198
underlyingAssetName: MintingAssetName,
199199
chain: ValidTestnetChainInput,
200-
amount: string,
201-
partnerCode: string = "bifrost"
202200
) {
203201
const underlyingAssetAddress = getTestnetAssetAddress(
204202
underlyingAssetName,
@@ -217,16 +215,6 @@ export function getTestnetConversionParams(
217215
throw new Error(`No contract address found for chain ID: ${chainName}`);
218216
}
219217

220-
// Check if the amount is a positive number
221-
if (Number(amount) <= 0) {
222-
throw new Error("Amount must be a positive number");
223-
}
224-
225-
// Check if partner code is valid string
226-
if (typeof partnerCode !== "string") {
227-
throw new Error("Partner code must be a string");
228-
}
229-
230218
const testnetConversionParams = {
231219
address: CONTRACT_ADDRESS_INFO[chainName].slpx!.address,
232220
abi: TESTNET_SLPX_V2_ABI,
@@ -236,3 +224,5 @@ export function getTestnetConversionParams(
236224

237225
return testnetConversionParams;
238226
}
227+
228+

0 commit comments

Comments
 (0)