Skip to content

Commit

Permalink
Merge branch 'fix/transaction-warning-issue' into 'develop'
Browse files Browse the repository at this point in the history
Fix/transaction warning issue

See merge request papers/airgap/airgap-vault!294
  • Loading branch information
godenzim committed Nov 4, 2021
2 parents 8982822 + 2bccfdc commit 6aea81e
Showing 1 changed file with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,30 @@ export class TransactionWarningComponent {
public set transaction(value: IAirGapTransaction | undefined) {
this._transaction = value
if (value) {
this.warnings = value.warnings.map((warning) => {
this.warnings = value.warnings?.map((warning) => {
return {
...warning,
color:
warning.type === AirGapTransactionWarningType.SUCCESS
? 'success'
: warning.type === AirGapTransactionWarningType.NOTE
? 'light'
: warning.type === AirGapTransactionWarningType.WARNING
? 'warning'
: warning.type === AirGapTransactionWarningType.ERROR
? 'danger'
: 'primary',
? 'light'
: warning.type === AirGapTransactionWarningType.WARNING
? 'warning'
: warning.type === AirGapTransactionWarningType.ERROR
? 'danger'
: 'primary',
icon: warning.icon
? warning.icon
: warning.type === AirGapTransactionWarningType.SUCCESS
? 'checkmark-circle-outline'
: warning.type === AirGapTransactionWarningType.NOTE
? 'information-circle-outline'
: warning.type === AirGapTransactionWarningType.WARNING
? 'warning'
: warning.type === AirGapTransactionWarningType.ERROR
? 'warning'
: 'warning'
? 'checkmark-circle-outline'
: warning.type === AirGapTransactionWarningType.NOTE
? 'information-circle-outline'
: warning.type === AirGapTransactionWarningType.WARNING
? 'warning'
: warning.type === AirGapTransactionWarningType.ERROR
? 'warning'
: 'warning'
}
})
}
Expand All @@ -49,7 +49,7 @@ export class TransactionWarningComponent {

public warnings: (AirGapTransactionWarning & { color: string })[] | undefined

constructor() {}
constructor() { }

// doAction(warning: AirGapTransactionWarning) {
// // TODO: Use link page
Expand Down

0 comments on commit 6aea81e

Please sign in to comment.