mirror of
https://github.com/pezkuwichain/pezkuwi-wallet-android.git
synced 2026-10-20 18:56:25 +00:00
fix: add BitcoinNative branch to exhaustive Chain.Asset.Type whens
CI caught onChainAssetId's when as non-exhaustive; a codebase-wide sweep for every other exhaustive when on Chain.Asset.Type found one more (existentialDepositError in Common.kt) that would have failed the same way.
This commit is contained in:
1 parent
af0bfa1560
commit
1830024ed0
2 files changed
+2
No files matched your search
+1
@@ -121,6 +121,7 @@ private fun Chain.Asset.existentialDepositError(amount: BigDecimal): WillRemoveA
|
|||||||
is Type.Statemine -> WillRemoveAccount.WillTransferDust(amount)
|
is Type.Statemine -> WillRemoveAccount.WillTransferDust(amount)
|
||||||
is Type.EvmErc20, is Type.EvmNative -> WillRemoveAccount.WillBurnDust
|
is Type.EvmErc20, is Type.EvmNative -> WillRemoveAccount.WillBurnDust
|
||||||
is Type.Trc20, Type.TronNative -> WillRemoveAccount.WillBurnDust
|
is Type.Trc20, Type.TronNative -> WillRemoveAccount.WillBurnDust
|
||||||
|
Type.BitcoinNative -> WillRemoveAccount.WillBurnDust
|
||||||
is Type.Equilibrium -> WillRemoveAccount.WillBurnDust
|
is Type.Equilibrium -> WillRemoveAccount.WillBurnDust
|
||||||
Type.Unsupported -> throw IllegalArgumentException("Unsupported")
|
Type.Unsupported -> throw IllegalArgumentException("Unsupported")
|
||||||
}
|
}
|
||||||
@@ -637,6 +637,7 @@ val Chain.Asset.onChainAssetId: String?
|
|||||||
is Type.EvmNative -> null
|
is Type.EvmNative -> null
|
||||||
is Type.Trc20 -> this.type.contractAddress
|
is Type.Trc20 -> this.type.contractAddress
|
||||||
Type.TronNative -> null
|
Type.TronNative -> null
|
||||||
|
Type.BitcoinNative -> null
|
||||||
Type.Unsupported -> error("Unsupported assetId type: ${this.type::class.simpleName}")
|
Type.Unsupported -> error("Unsupported assetId type: ${this.type::class.simpleName}")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user