Skip to content

Commit

Permalink
Merge pull request #105 from NazarUsov/testnet/issues
Browse files Browse the repository at this point in the history
Fix a transaction without subtransfers
  • Loading branch information
cryptozoidberg authored Mar 6, 2024
2 parents a0784df + 79c09aa commit 55e1cb9
Show file tree
Hide file tree
Showing 36 changed files with 226 additions and 151 deletions.
6 changes: 3 additions & 3 deletions html_source/src/app/api/models/transaction.model.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BigNumber } from 'bignumber.js';

export class Transaction {
export interface Transaction {
comment: string;
employed_entries: {
receive: {
Expand All @@ -22,11 +22,11 @@ export class Transaction {
payment_id: string;
remote_addresses: string[];
show_sender: boolean;
subtransfers: {
subtransfers?: {
amount: BigNumber;
asset_id: string;
is_income: boolean;
}[];
}[] | undefined;
timestamp: number;
tx_blob_size: number;
remote_aliases?: string[];
Expand Down
4 changes: 2 additions & 2 deletions html_source/src/app/api/models/wallet.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ export class Wallet {
prepareHistory(items: Transaction[]): void {
for (let i = 0; i < items.length; i++) {
if (
(items[i].tx_type === 7 && items[i].subtransfers.find(({ is_income }) => is_income)) ||
(items[i].tx_type === 11 && items[i].subtransfers.find(({ is_income }) => is_income))
(items[i].tx_type === 7 && items[i].subtransfers?.find(({ is_income }) => is_income)) ||
(items[i].tx_type === 11 && items[i].subtransfers?.find(({ is_income }) => is_income))
) {
let exists = false;
for (let j = 0; j < this.excluded_history.length; j++) {
Expand Down
320 changes: 176 additions & 144 deletions html_source/src/app/pages/wallet/tabs/history/history.component.ts

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ export class HistoryTypeMessagesPipe implements PipeTransform {
? this.translate.instant('HISTORY.TYPE_MESSAGES.POS_REWARD')
: this.translate.instant('HISTORY.TYPE_MESSAGES.POW_REWARD');
case 7:
return this.translate.instant('HISTORY.TYPE_MESSAGES.CREATE_CONTRACT');
if (!item.subtransfers || !item.subtransfers.length) {
return this.translate.instant('HISTORY.TYPE_MESSAGES.SERVICE_TRANSACTIONS');
} else {
return this.translate.instant('HISTORY.TYPE_MESSAGES.CREATE_CONTRACT');
}
case 8:
return this.translate.instant('HISTORY.TYPE_MESSAGES.PLEDGE_CONTRACT');
// case 9:
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 @@ -366,6 +366,7 @@
"POS_REWARD": "POS reward",
"POW_REWARD": "POW reward",
"PROPOSAL_CANCEL_CONTRACT": "Cancellation request",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Undefined",
"UPDATE_ALIAS": "Fee for editing alias"
}
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 @@ -366,6 +366,7 @@
"POS_REWARD": "POS reward",
"POW_REWARD": "POW reward",
"PROPOSAL_CANCEL_CONTRACT": "Cancellation request",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Undefined",
"UPDATE_ALIAS": "Fee for editing alias"
}
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 @@ -366,6 +366,7 @@
"POS_REWARD": "POS reward",
"POW_REWARD": "POW reward",
"PROPOSAL_CANCEL_CONTRACT": "Cancellation request",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Undefined",
"UPDATE_ALIAS": "Fee for editing alias"
}
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 @@ -366,6 +366,7 @@
"POS_REWARD": "POS reward",
"POW_REWARD": "POW reward",
"PROPOSAL_CANCEL_CONTRACT": "Cancellation request",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Undefined",
"UPDATE_ALIAS": "Fee for editing alias"
}
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 @@ -366,6 +366,7 @@
"POS_REWARD": "POS reward",
"POW_REWARD": "POW reward",
"PROPOSAL_CANCEL_CONTRACT": "Cancellation request",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Undefined",
"UPDATE_ALIAS": "Fee for editing alias"
}
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 @@ -366,6 +366,7 @@
"POS_REWARD": "POS-Belohnung",
"POW_REWARD": "POW-Belohnung",
"PROPOSAL_CANCEL_CONTRACT": "Stornierungsanfrage",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Unbedefiniert",
"UPDATE_ALIAS": "Gebühr für die Bearbeitung eines Alias"
}
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 @@ -366,6 +366,7 @@
"POS_REWARD": "POS reward",
"POW_REWARD": "POW reward",
"PROPOSAL_CANCEL_CONTRACT": "Cancellation request",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Undefined",
"UPDATE_ALIAS": "Fee for editing alias"
}
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 @@ -366,6 +366,7 @@
"POS_REWARD": "POS reward",
"POW_REWARD": "POW reward",
"PROPOSAL_CANCEL_CONTRACT": "Cancellation request",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Undefined",
"UPDATE_ALIAS": "Fee for editing alias"
}
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 @@ -366,6 +366,7 @@
"POS_REWARD": "POS reward",
"POW_REWARD": "POW reward",
"PROPOSAL_CANCEL_CONTRACT": "Cancellation request",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Undefined",
"UPDATE_ALIAS": "Fee for editing alias"
}
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 @@ -366,6 +366,7 @@
"POS_REWARD": "POS reward",
"POW_REWARD": "POW reward",
"PROPOSAL_CANCEL_CONTRACT": "Cancellation request",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Undefined",
"UPDATE_ALIAS": "Fee for editing alias"
}
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 @@ -366,6 +366,7 @@
"POS_REWARD": "Récompense POS",
"POW_REWARD": "Récompense POW",
"PROPOSAL_CANCEL_CONTRACT": "Demande d'annulation",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Non défini",
"UPDATE_ALIAS": "Frais pour modifier l'alias"
}
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 @@ -366,6 +366,7 @@
"POS_REWARD": "POS reward",
"POW_REWARD": "POW reward",
"PROPOSAL_CANCEL_CONTRACT": "Cancellation request",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Undefined",
"UPDATE_ALIAS": "Fee for editing alias"
}
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 @@ -366,6 +366,7 @@
"POS_REWARD": "POS reward",
"POW_REWARD": "POW reward",
"PROPOSAL_CANCEL_CONTRACT": "Cancellation request",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Undefined",
"UPDATE_ALIAS": "Fee for editing alias"
}
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 @@ -366,6 +366,7 @@
"POS_REWARD": "Hadiah POS",
"POW_REWARD": "Hadiah POW",
"PROPOSAL_CANCEL_CONTRACT": "Permintaan pembatalan",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Tidak terdefinisi",
"UPDATE_ALIAS": "Biaya untuk mengubah alias"
}
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 @@ -366,6 +366,7 @@
"POS_REWARD": "Ricompensa POS",
"POW_REWARD": "Ricompensa POW",
"PROPOSAL_CANCEL_CONTRACT": "Richiesta di cancellazione",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Non definito",
"UPDATE_ALIAS": "Tassa per modificare alias"
}
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 @@ -366,6 +366,7 @@
"POS_REWARD": "POS reward",
"POW_REWARD": "POW reward",
"PROPOSAL_CANCEL_CONTRACT": "Cancellation request",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Undefined",
"UPDATE_ALIAS": "Fee for editing alias"
}
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 @@ -366,6 +366,7 @@
"POS_REWARD": "POS reward",
"POW_REWARD": "POW reward",
"PROPOSAL_CANCEL_CONTRACT": "Cancellation request",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Undefined",
"UPDATE_ALIAS": "Fee for editing alias"
}
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 @@ -366,6 +366,7 @@
"POS_REWARD": "POS reward",
"POW_REWARD": "POW reward",
"PROPOSAL_CANCEL_CONTRACT": "Cancellation request",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Undefined",
"UPDATE_ALIAS": "Fee for editing alias"
}
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 @@ -366,6 +366,7 @@
"POS_REWARD": "POS reward",
"POW_REWARD": "POW reward",
"PROPOSAL_CANCEL_CONTRACT": "Cancellation request",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Undefined",
"UPDATE_ALIAS": "Fee for editing alias"
}
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 @@ -366,6 +366,7 @@
"POS_REWARD": "POS reward",
"POW_REWARD": "POW reward",
"PROPOSAL_CANCEL_CONTRACT": "Cancellation request",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Undefined",
"UPDATE_ALIAS": "Fee for editing alias"
}
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 @@ -366,6 +366,7 @@
"POS_REWARD": "Recompensa de POS",
"POW_REWARD": "Recompensa de POW",
"PROPOSAL_CANCEL_CONTRACT": "Cancelar pedido",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Indefinido",
"UPDATE_ALIAS": "Taxa para edição de alias"
}
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 @@ -366,6 +366,7 @@
"POS_REWARD": "POS reward",
"POW_REWARD": "POW reward",
"PROPOSAL_CANCEL_CONTRACT": "Cancellation request",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Undefined",
"UPDATE_ALIAS": "Fee for editing alias"
}
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 @@ -366,6 +366,7 @@
"POS_REWARD": "POS reward",
"POW_REWARD": "POW reward",
"PROPOSAL_CANCEL_CONTRACT": "Cancellation request",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Undefined",
"UPDATE_ALIAS": "Fee for editing alias"
}
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 @@ -366,6 +366,7 @@
"POS_REWARD": "POS reward",
"POW_REWARD": "POW reward",
"PROPOSAL_CANCEL_CONTRACT": "Cancellation request",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Undefined",
"UPDATE_ALIAS": "Fee for editing alias"
}
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 @@ -366,6 +366,7 @@
"POS_REWARD": "POS reward",
"POW_REWARD": "POW reward",
"PROPOSAL_CANCEL_CONTRACT": "Cancellation request",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Undefined",
"UPDATE_ALIAS": "Fee for editing alias"
}
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 @@ -366,6 +366,7 @@
"POS_REWARD": "POS reward",
"POW_REWARD": "POW reward",
"PROPOSAL_CANCEL_CONTRACT": "Cancellation request",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Undefined",
"UPDATE_ALIAS": "Fee for editing alias"
}
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 @@ -366,6 +366,7 @@
"POS_REWARD": "POS reward",
"POW_REWARD": "POW reward",
"PROPOSAL_CANCEL_CONTRACT": "Cancellation request",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Undefined",
"UPDATE_ALIAS": "Fee for editing alias"
}
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 @@ -366,6 +366,7 @@
"POS_REWARD": "POS reward",
"POW_REWARD": "POW reward",
"PROPOSAL_CANCEL_CONTRACT": "Cancellation request",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Undefined",
"UPDATE_ALIAS": "Fee for editing alias"
}
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 @@ -366,6 +366,7 @@
"POS_REWARD": "POS reward",
"POW_REWARD": "POW reward",
"PROPOSAL_CANCEL_CONTRACT": "Cancellation request",
"SERVICE_TRANSACTIONS": "Service transactions",
"UNDEFINED": "Undefined",
"UPDATE_ALIAS": "Fee for editing alias"
}
Expand Down
5 changes: 5 additions & 0 deletions html_source/src/assets/icons/gray/fire_ico.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions html_source/src/assets/scss/components/_icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,9 @@ i {
&.success {
background: center / contain no-repeat url(~src/assets/icons/aqua/modal-success.svg);
}

// gray
&.fire {
background: center / contain no-repeat url(~src/assets/icons/gray/fire_ico.svg);
}
}
2 changes: 1 addition & 1 deletion html_source/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
import 'lodash';

export const buildTime = '2023-11-22T09:13:55.758Z';
export const buildTime = '2024-03-06T13:59:36.086Z';

if (environment.production) {
enableProdMode();
Expand Down

0 comments on commit 55e1cb9

Please sign in to comment.