Skip to content

Commit

Permalink
Fixed not calculating asset deposit for Ergo for now
Browse files Browse the repository at this point in the history
  • Loading branch information
vsubhuman committed Sep 22, 2021
1 parent fd30da3 commit ef65039
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,8 @@ export default class TransactionsStore extends Store<StoresMap, ActionsMap> {
const deriverParent = request.publicDeriver.getParent();
const networkInfo = deriverParent.getNetworkInfo();
const defaultToken = deriverParent.getDefaultToken();
const minUtxoVal = getMinUtxoValue(networkInfo);
const isCardano = isCardanoHaskell(networkInfo);
const minUtxoVal = isCardano ? getMinUtxoValue(networkInfo) : RustModule.WalletV4.BigNum.zero();

// calculate pending transactions just to cache the result
const requests = this.getTxRequests(request.publicDeriver).requests;
Expand Down Expand Up @@ -362,12 +363,12 @@ export default class TransactionsStore extends Store<StoresMap, ActionsMap> {
});
getAssetDepositRequest.execute({
getBalance: async (): Promise<MultiToken> => {
const WalletV4 = RustModule.WalletV4;
try {
const canGetUtxos = asGetAllUtxos(publicDeriver);
if (canGetUtxos == null) {
if (!isCardano || canGetUtxos == null) {
return newMultiToken(defaultToken);
}
const WalletV4 = RustModule.WalletV4;
const utxos = await canGetUtxos.getAllUtxos();
const addressedUtxos = asAddressedUtxo(utxos)
.filter(u => u.assets.length > 0);
Expand Down

0 comments on commit ef65039

Please sign in to comment.