Skip to content

Commit

Permalink
Merge pull request #136 from NazarUsov/hot-fix-wrap-info
Browse files Browse the repository at this point in the history
Hot fix for "wrap info service inactive"
  • Loading branch information
sowle authored Jan 6, 2025
2 parents 638f98f + d902547 commit 5c27d8e
Show file tree
Hide file tree
Showing 31 changed files with 45 additions and 3 deletions.
15 changes: 12 additions & 3 deletions html_source/src/app/pages/wallet/tabs/send/send.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
lowerCaseDisabled: lowerCaseDisabled$ | async
} as vm"
>
<div class="form__field fixed">
<div class="form__field">
<label for="address">
{{ 'SEND.ADDRESS' | translate }}
<span class="color-red">*</span>
Expand Down Expand Up @@ -71,14 +71,22 @@
{{ errorMessages['address'] | translate }}
</div>

<ng-container *ngIf="isVisibleWrapInfoState$ | async">
<ng-container *ngIf="wrapInfoServiceInactive$ | async">
<div class="error">
{{ 'ERRORS.WRAP_SERVICE_IS_INACTIVE' | translate }}
</div>
</ng-container>
</ng-container>

<div *ngIf="aliasAddress" class="info text-ellipsis">
<span>{{ aliasAddress | zanoShortString }}</span>
</div>
</div>
</ng-container>

<!-- Amount -->
<div class="form__field fixed amount">
<div class="form__field amount">
<label for="send-amount">
{{ 'SEND.AMOUNT' | translate }}
<span class="color-red">*</span>
Expand Down Expand Up @@ -291,7 +299,8 @@
</div>
</div>

<button [disabled]="form.invalid || !variablesService.currentWallet.loaded"
<button [disabled]="form.invalid || !variablesService.currentWallet.loaded ||
((isVisibleWrapInfoState$ | async) ?? (wrapInfoServiceInactive$ | async))"
class="primary big max-w-19-rem w-100" type="submit">
{{ 'SEND.BUTTON' | translate }}
</button>
Expand Down
4 changes: 4 additions & 0 deletions html_source/src/app/pages/wallet/tabs/send/send.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ export class SendComponent implements OnDestroy {

isVisibleWrapInfoState$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);

wrapInfoServiceInactive$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(true);

aliasAddress: string;

isVisibleAdditionalOptionsState: boolean = false;
Expand Down Expand Up @@ -796,10 +798,12 @@ export class SendComponent implements OnDestroy {
)
.subscribe({
next: (wrapInfo: WrapInfo) => {
this.wrapInfoServiceInactive$.next(false);
this.wrapInfo = wrapInfo;
this.loadingWrapInfo$.next(false);
},
error: () => {
this.wrapInfoServiceInactive$.next(true);
this.loadingWrapInfo$.next(false);
},
complete: () => {
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/af.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Error. Failed to change comment to alias in safe",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "Watch-only wallets can only be opened by simplewallet",
"WALLET_WRONG_ID": "Invalid wallet ID",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Invalid password",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Error. Failed to change comment to alias in safe",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "Watch-only wallets can only be opened by simplewallet",
"WALLET_WRONG_ID": "Invalid wallet ID",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Invalid password",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Error. Failed to change comment to alias in safe",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "Watch-only wallets can only be opened by simplewallet",
"WALLET_WRONG_ID": "Invalid wallet ID",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Invalid password",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Error. Failed to change comment to alias in safe",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "Watch-only wallets can only be opened by simplewallet",
"WALLET_WRONG_ID": "Invalid wallet ID",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Invalid password",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Error. Failed to change comment to alias in safe",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "Watch-only wallets can only be opened by simplewallet",
"WALLET_WRONG_ID": "Invalid wallet ID",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Invalid password",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Fehler. Fehlgeschlagen Kommentar von gespeichertem Alias zu ändern",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "Watch-only-Wallets können nur von simplewallet geöffnet werden",
"WALLET_WRONG_ID": "Ungültige Wallet-ID",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Ungültiges Passwort",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Error. Failed to change comment to alias in safe",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "Watch-only wallets can only be opened by simplewallet",
"WALLET_WRONG_ID": "Invalid wallet ID",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Invalid password",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Error. Failed to change comment to alias in safe",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "Watch-only wallets can only be opened by simplewallet",
"WALLET_WRONG_ID": "Invalid wallet ID",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Invalid password",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Error. Failed to change comment to alias in safe",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "Watch-only wallets can only be opened by simplewallet",
"WALLET_WRONG_ID": "Invalid wallet ID",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Invalid password",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Error. Failed to change comment to alias in safe",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "Watch-only wallets can only be opened by simplewallet",
"WALLET_WRONG_ID": "Invalid wallet ID",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Invalid password",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Erreur. Impossible de changer le commentaire de l'alias actuel",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "Les portefeuilles réservés aux montres ne peuvent être ouverts que par simplewallet",
"WALLET_WRONG_ID": "ID de portefeuille invalide",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Mot de passe invalide",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Error. Failed to change comment to alias in safe",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "Watch-only wallets can only be opened by simplewallet",
"WALLET_WRONG_ID": "Invalid wallet ID",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Invalid password",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Error. Failed to change comment to alias in safe",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "Watch-only wallets can only be opened by simplewallet",
"WALLET_WRONG_ID": "Invalid wallet ID",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Invalid password",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Error. Gagal mengubah komentar menjadi alias dengan aman",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "Dompet khusus jam tangan hanya dapat dibuka dengan simplewallet",
"WALLET_WRONG_ID": "ID dompet tidak valid",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Katasandi tidak valid",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Errore. Impossibile cambiare il commento all'alias in sicurezza",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "I portafogli solo per orologi possono essere aperti solo da simplewallet",
"WALLET_WRONG_ID": "ID portafoglio non valido",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Password non valida",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Error. Failed to change comment to alias in safe",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "Watch-only wallets can only be opened by simplewallet",
"WALLET_WRONG_ID": "Invalid wallet ID",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Invalid password",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Error. Failed to change comment to alias in safe",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "Watch-only wallets can only be opened by simplewallet",
"WALLET_WRONG_ID": "Invalid wallet ID",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Invalid password",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Error. Failed to change comment to alias in safe",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "Watch-only wallets can only be opened by simplewallet",
"WALLET_WRONG_ID": "Invalid wallet ID",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Invalid password",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/no.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Error. Failed to change comment to alias in safe",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "Watch-only wallets can only be opened by simplewallet",
"WALLET_WRONG_ID": "Invalid wallet ID",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Invalid password",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Error. Failed to change comment to alias in safe",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "Watch-only wallets can only be opened by simplewallet",
"WALLET_WRONG_ID": "Invalid wallet ID",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Invalid password",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Erro. Falha ao mudar comentário a um alias seguro",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "Carteiras somente para assistir só podem ser abertas por simplewallet",
"WALLET_WRONG_ID": "ID de carteira inválido",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Password inválida",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/ro.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Error. Failed to change comment to alias in safe",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "Watch-only wallets can only be opened by simplewallet",
"WALLET_WRONG_ID": "Invalid wallet ID",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Invalid password",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Error. Failed to change comment to alias in safe",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "Watch-only wallets can only be opened by simplewallet",
"WALLET_WRONG_ID": "Invalid wallet ID",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Invalid password",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/sr.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Error. Failed to change comment to alias in safe",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "Watch-only wallets can only be opened by simplewallet",
"WALLET_WRONG_ID": "Invalid wallet ID",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Invalid password",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Error. Failed to change comment to alias in safe",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "Watch-only wallets can only be opened by simplewallet",
"WALLET_WRONG_ID": "Invalid wallet ID",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Invalid password",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Error. Failed to change comment to alias in safe",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "Watch-only wallets can only be opened by simplewallet",
"WALLET_WRONG_ID": "Invalid wallet ID",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Invalid password",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/uk.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Error. Failed to change comment to alias in safe",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "Watch-only wallets can only be opened by simplewallet",
"WALLET_WRONG_ID": "Invalid wallet ID",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Invalid password",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Error. Failed to change comment to alias in safe",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "Watch-only wallets can only be opened by simplewallet",
"WALLET_WRONG_ID": "Invalid wallet ID",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Invalid password",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down
1 change: 1 addition & 0 deletions html_source/src/assets/i18n/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"TX_TYPE_UPDATE_ALIAS": "Error. Failed to change comment to alias in safe",
"WALLET_WATCH_ONLY_NOT_SUPPORTED": "Watch-only wallets can only be opened by simplewallet",
"WALLET_WRONG_ID": "Invalid wallet ID",
"WRAP_SERVICE_IS_INACTIVE": "Wrap service is inactive",
"WRONG_PASSWORD": "Invalid password",
"WRONG_PASSWORD_MUST_BE": "Invalid password. Password must be"
},
Expand Down

0 comments on commit 5c27d8e

Please sign in to comment.