Skip to content

Commit

Permalink
Merge branch 'develop' into 'master'
Browse files Browse the repository at this point in the history
3.32.6 release

See merge request papers/airgap/airgap-wallet!782
  • Loading branch information
isordo committed Jan 28, 2025
2 parents 55d5c9e + 0d4557d commit 1b5386f
Show file tree
Hide file tree
Showing 12 changed files with 375 additions and 371 deletions.
628 changes: 314 additions & 314 deletions package-lock.json

Large diffs are not rendered by default.

42 changes: 21 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,29 +55,29 @@
},
"dependencies": {
"@airgap-community/iso-rootstock": "1.0.0",
"@airgap/acurast": "0.13.35",
"@airgap/aeternity": "0.13.35",
"@airgap/angular-core": "0.0.51",
"@airgap/angular-ngrx": "0.0.51",
"@airgap/astar": "0.13.35",
"@airgap/acurast": "0.13.39",
"@airgap/aeternity": "0.13.39",
"@airgap/angular-core": "0.0.55",
"@airgap/angular-ngrx": "0.0.55",
"@airgap/astar": "0.13.39",
"@airgap/beacon-sdk": "3.1.5-beta.0",
"@airgap/bitcoin": "0.13.35",
"@airgap/coinlib-core": "0.13.35",
"@airgap/coreum": "0.13.35",
"@airgap/cosmos": "0.13.35",
"@airgap/cosmos-core": "0.13.35",
"@airgap/crypto": "0.13.35",
"@airgap/ethereum": "0.13.35",
"@airgap/groestlcoin": "0.13.35",
"@airgap/icp": "0.13.35",
"@airgap/module-kit": "0.13.35",
"@airgap/moonbeam": "0.13.35",
"@airgap/optimism": "0.13.35",
"@airgap/polkadot": "0.13.35",
"@airgap/bitcoin": "0.13.39",
"@airgap/coinlib-core": "0.13.39",
"@airgap/coreum": "0.13.39",
"@airgap/cosmos": "0.13.39",
"@airgap/cosmos-core": "0.13.39",
"@airgap/crypto": "0.13.39",
"@airgap/ethereum": "0.13.39",
"@airgap/groestlcoin": "0.13.39",
"@airgap/icp": "0.13.39",
"@airgap/module-kit": "0.13.39",
"@airgap/moonbeam": "0.13.39",
"@airgap/optimism": "0.13.39",
"@airgap/polkadot": "0.13.39",
"@airgap/sapling-wasm": "0.0.7",
"@airgap/serializer": "0.13.35",
"@airgap/substrate": "0.13.35",
"@airgap/tezos": "0.13.35",
"@airgap/serializer": "0.13.39",
"@airgap/substrate": "0.13.39",
"@airgap/tezos": "0.13.39",
"@angular/animations": "^16.1.1",
"@angular/common": "^16.1.1",
"@angular/core": "^16.1.1",
Expand Down
14 changes: 11 additions & 3 deletions src/app/extensions/delegation/TezosDelegationExtensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,21 @@ export class TezosDelegationExtensions extends V1ProtocolDelegationExtensions<Te
bakerDetails: DelegateeDetails,
address: string
): Promise<AirGapDelegateeDetails> {
const [bakerInfo, delegateeDetails, knownBakers] = await Promise.all([
const [bakerInfo, delegateeDetails, knownBakers, stakedBalance] = await Promise.all([
adapter.protocolV1.bakerDetails(bakerDetails.address),
adapter.getDelegateeDetails(bakerDetails.address),
this.getKnownBakers()
this.getKnownBakers(),
adapter.protocolV1.getstakeBalance(bakerDetails.address)
])

const { balance, delegatedBalance, totalDelegatedStake } = bakerInfo

const ownBalance = new BigNumber(balance.value).minus(stakedBalance.total.value)

const bakerCurrentUsage = new BigNumber(delegatedBalance.value).minus(totalDelegatedStake.value).plus(ownBalance)

const knownBaker = knownBakers[bakerDetails.address]

const name = knownBaker
? knownBaker.alias
: (await this.addressService.getAlias(bakerDetails.address, adapter)) ||
Expand All @@ -169,7 +178,6 @@ export class TezosDelegationExtensions extends V1ProtocolDelegationExtensions<Te
? knownBaker.stakingCapacity.shiftedBy(adapter.decimals)
: new BigNumber(bakerInfo.bakerCapacity).multipliedBy(0.7)

const bakerCurrentUsage = BigNumber.minimum(new BigNumber(bakerInfo.stakingBalance.value), bakerTotalUsage)
const bakerUsage = bakerCurrentUsage.dividedBy(bakerTotalUsage)

let status: string
Expand Down
42 changes: 20 additions & 22 deletions src/app/pages/portfolio/portfolio.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<ion-header class="ion-no-border">
<div *ngIf="shopBannerText.length > 0" class="shop-banner-wrapper" (click)="onClickLink(shopBannerLink)">
<!-- <div *ngIf="shopBannerText.length > 0" class="shop-banner-wrapper" (click)="onClickLink(shopBannerLink)">
<p class="shop-banner-text">{{ shopBannerText }}</p>
</div>
</div> -->
<ion-toolbar color="translucent">
<ion-buttons slot="start">
<ion-menu-button></ion-menu-button>
Expand All @@ -12,31 +12,29 @@
<ion-grid fixed="true" class="ion-no-padding">
<ng-container *ngIf="activeWallets | async as walletsArray">
<ion-row *ngIf="walletsArray.length > 0" class="ion-padding-horizontal ion-align-items-end ion-justify-content-center">
<flip-card>
<flip-card-front>
<div style="display: flex; flex-direction: column; justify-content: center; align-items: center;">
<span>{{ 'portfolio.flip-card.front-title' | translate }}</span>
<ng-component *ngIf="isVisible && total > 0; then showBalance; else skeletonBalance"></ng-component>
<ng-template #showBalance>
<h1 [ngClass]="total < 1000000 ? 'large-font': 'small-font'">${{ total | number: '1.2-2' }}</h1>
</ng-template>
<!-- <flip-card> -->
<!-- <flip-card-front> -->
<div style="display: flex; flex-direction: column; justify-content: center; align-items: center;">
<span>{{ 'portfolio.flip-card.front-title' | translate }}</span>
<ng-component *ngIf="isVisible && total > 0; then showBalance; else skeletonBalance"></ng-component>
<ng-template #showBalance>
<h1 [ngClass]="total < 1000000 ? 'large-font': 'small-font'">${{ total | number: '1.2-2' }}</h1>
</ng-template>

<ng-template #skeletonBalance>
<h1 class="ion-no-margin">
<ion-skeleton-text animated style="width: 130px;"></ion-skeleton-text>
</h1>
</ng-template>
</div>
</flip-card-front>
<flip-card-back (click)="onClickLink(knoxFlipCardLink)">
<ng-template #skeletonBalance>
<h1 class="ion-no-margin">
<ion-skeleton-text animated style="width: 130px;"></ion-skeleton-text>
</h1>
</ng-template>
</div>
<!-- </flip-card-front> -->
<!-- <flip-card-back (click)="onClickLink(knoxFlipCardLink)">
<div style="display: flex; justify-content: center; align-items: center; margin-top: 10px;">
<svg
style="width: 180px; height: auto; display: flex; margin-left: 5%; margin-right: 10px; fill: currentColor;"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 2179.1057 1019.2946"
>
<!-- SVG content goes here -->

<g id="e">
<path
class="i"
Expand Down Expand Up @@ -92,8 +90,8 @@ <h6 style="margin-right: 5%;">{{ 'portfolio.flip-card.back-title' | translate }}
<p>{{knoxFlipCardLine1}}</p>
<p>{{knoxFlipCardLine2}}</p>
</div>
</flip-card-back>
</flip-card>
</flip-card-back> -->
<!-- </flip-card> -->
</ion-row>
</ng-container>
<ion-toolbar color="translucent">
Expand Down
6 changes: 2 additions & 4 deletions src/app/pages/settings/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@
</ion-grid>
</ion-header>

<ion-card *ngIf="showKnoxBanner" color="dark">
<!-- <ion-card *ngIf="showKnoxBanner" color="dark">
<ion-toolbar color="dark">
<svg
style="width: 150px; height: auto; display: block; margin: auto; margin-top: 10px; fill: currentColor;"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 2179.1057 1019.2946"
>
<!-- SVG content goes here -->

<g id="e">
<path
class="i"
Expand Down Expand Up @@ -90,7 +88,7 @@
{{ 'settings.knox-button_label' | translate }}
</ion-button>
</div>
</ion-card>
</ion-card> -->

<ion-content>
<ion-grid fixed="true" class="ion-no-padding">
Expand Down
2 changes: 1 addition & 1 deletion src/assets/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"add-tokens_label": "Token hinzufügen",
"collectibles_label": "Sammlerstücke",
"import-accounts_label": "Konten importieren",
"delegate_label": "Delegation",
"delegate_label": "Delegate & Stake",
"undelegate_label": "Aufheben der Delegation",
"claim_rewards_label": "Belohnung entgegennehmen",
"vote_label": "Wählen",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"add-tokens_label": "Add Tokens",
"collectibles_label": "Collectibles",
"import-accounts_label": "Import Accounts",
"delegate_label": "Delegation",
"delegate_label": "Delegate & Stake",
"undelegate_label": "Undelegate",
"claim_rewards_label": "Claim Rewards",
"vote_label": "Voting",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"add-tokens_label": "Añadir Token",
"collectibles_label": "NFTs",
"import-accounts_label": "Importar Cuentas",
"delegate_label": "Delegación",
"delegate_label": "Delegar y stakear",
"undelegate_label": "Desdelegar",
"claim_rewards_label": "Reclamar Recompensas",
"vote_label": "Votación",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"add-tokens_label": "Ajouter des jetons",
"collectibles_label": "Objets de collection",
"import-accounts_label": "Comptes d'importation",
"delegate_label": "Délégation",
"delegate_label": "Déléguer et staker",
"undelegate_label": "Annuler la délégation",
"claim_rewards_label": "Réclamez des récompenses",
"vote_label": "Vote",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/i18n/pt_BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"add-tokens_label": "Adicionar Tokens",
"collectibles_label": "Colecionáveis",
"import-accounts_label": "Importar contas",
"delegate_label": "Delegar",
"delegate_label": "Delegar e fazer staking",
"undelegate_label": "Cancelar delegação",
"claim_rewards_label": "Reivindicar recompensas",
"vote_label": "Votar",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/i18n/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"add-tokens_label": "Добавить токены",
"collectibles_label": "Коллекционные",
"import-accounts_label": "Импорт аккаунтов",
"delegate_label": "Делегирование",
"delegate_label": "Делегировать и стейкать",
"undelegate_label": "Отменить делегирование",
"claim_rewards_label": "Забрать награду",
"vote_label": "Голосование",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/i18n/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"add-tokens_label": "添加代币",
"collectibles_label": "收藏品",
"import-accounts_label": "导入帐户",
"delegate_label": "委托",
"delegate_label": "委托和质押",
"undelegate_label": "取消委托",
"claim_rewards_label": "领取奖励",
"vote_label": "投票",
Expand Down

0 comments on commit 1b5386f

Please sign in to comment.