Skip to content

Commit

Permalink
Merge pull request #941 from radixdlt/fix/ABW-3367-olympia-import-issue
Browse files Browse the repository at this point in the history
Fix olympia import issue and update sargon to fix 3rd party deposits
  • Loading branch information
jakub-rdx authored May 28, 2024
2 parents fb76a72 + 6470626 commit 4280c0e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@ sealed interface Transferable {
when (val transferable = transferable) {
is TransferableAsset.Fungible.Token -> GuaranteeAssertion.ForAmount(
amount = transferable.amount * predicted.guaranteeOffset,
percentage = predicted.guaranteeOffset,
instructionIndex = predicted.instructionIndex
)
is TransferableAsset.Fungible.PoolUnitAsset -> GuaranteeAssertion.ForAmount(
amount = transferable.amount * predicted.guaranteeOffset,
percentage = predicted.guaranteeOffset,
instructionIndex = predicted.instructionIndex
)
is TransferableAsset.Fungible.LSUAsset -> GuaranteeAssertion.ForAmount(
amount = transferable.amount * predicted.guaranteeOffset,
percentage = predicted.guaranteeOffset,
instructionIndex = predicted.instructionIndex
)
is TransferableAsset.NonFungible.NFTAssets -> GuaranteeAssertion.ForNFT(
Expand Down Expand Up @@ -89,6 +92,7 @@ sealed interface GuaranteeAssertion {

data class ForAmount(
val amount: Decimal192,
val percentage: Decimal192,
override val instructionIndex: Long
) : GuaranteeAssertion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,7 @@ class AccountThirdPartyDepositsViewModel @Inject constructor(
fun setAddAssetSheetVisible(isVisible: Boolean) {
_state.update {
it.copy(
selectedSheetState = if (isVisible) SelectedDepositsSheetState.AddAsset else null,
assetExceptionToAdd = if (isVisible) AssetType.ExceptionType() else it.assetExceptionToAdd
selectedSheetState = if (isVisible) SelectedDepositsSheetState.AddAsset else null
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ class TransactionSubmitDelegate @Inject constructor(
amount = assertion.amount,
instructionIndex = assertion.instructionIndex.toULong(),
resourceAddress = resource.address,
resourceDivisibility = resource.divisibility?.value
resourceDivisibility = resource.divisibility?.value,
percentage = assertion.percentage
)
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/libraries.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ hiltNavigation = "1.1.0"
biometricKtx = "1.2.0-alpha05"
coilCompose = "2.5.0"
kotlinxSerialization = "1.6.2"
sargon = "1.0.2-81997d86"
sargon = "1.0.4-1195c5df"
okhttpBom = "5.0.0-alpha.11"
retrofit = "2.9.0"
retrofitKoltinxConverter = "1.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ class GetFactorSourceIdForOlympiaAccountsUseCase @Inject constructor(
}
.find { fromHashId ->
val readMnemonicResult = mnemonicRepository.readMnemonic(fromHashId)
val exception = readMnemonicResult.exceptionOrNull()
if (exception != null) {
return@withContext Result.failure(exception)
}
readMnemonicResult.getOrNull()?.validatePublicKeysOf(olympiaAccounts) == true
}?.value?.asGeneral()
Result.success(existingId)
Expand Down

0 comments on commit 4280c0e

Please sign in to comment.