From 79ce155b45bae653a42f936f3d34eb9409bff682 Mon Sep 17 00:00:00 2001 From: Luca Spinazzola Date: Mon, 31 Oct 2022 17:35:00 -0400 Subject: [PATCH] fix secondary constructor --- .../kotlin/io/eqoty/secretk/client/SigningCosmWasmClient.kt | 4 ++-- secretk/src/commonMain/kotlin/io/eqoty/secretk/types/Coin.kt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/secretk/src/commonMain/kotlin/io/eqoty/secretk/client/SigningCosmWasmClient.kt b/secretk/src/commonMain/kotlin/io/eqoty/secretk/client/SigningCosmWasmClient.kt index 902cb8d..b990831 100644 --- a/secretk/src/commonMain/kotlin/io/eqoty/secretk/client/SigningCosmWasmClient.kt +++ b/secretk/src/commonMain/kotlin/io/eqoty/secretk/client/SigningCosmWasmClient.kt @@ -161,8 +161,8 @@ private constructor( gas = txOptions.gasLimit, amount = listOf( Coin( - txOptions.feeDenom, - gasToFee(txOptions.gasLimit, txOptions.gasPriceInFeeDenom) + gasToFee(txOptions.gasLimit, txOptions.gasPriceInFeeDenom), + txOptions.feeDenom ) ), granter = txOptions.feeGranter diff --git a/secretk/src/commonMain/kotlin/io/eqoty/secretk/types/Coin.kt b/secretk/src/commonMain/kotlin/io/eqoty/secretk/types/Coin.kt index 765d2a8..a842bb1 100644 --- a/secretk/src/commonMain/kotlin/io/eqoty/secretk/types/Coin.kt +++ b/secretk/src/commonMain/kotlin/io/eqoty/secretk/types/Coin.kt @@ -8,8 +8,8 @@ data class Coin( val amount: String, val denom: String ) { - constructor(denom: String, amount: Int) : this(amount.toString(), denom) - constructor(denom: String, amount: BigInteger) : this(amount.toString(), denom) + constructor(amount: Int, denom: String) : this(amount.toString(), denom) + constructor(amount: BigInteger, denom: String) : this(amount.toString(), denom) fun toProto() = CoinProto(denom, amount)