Skip to content

Commit

Permalink
Add effect for burnTokenSuccess action in TransactionEffects
Browse files Browse the repository at this point in the history
* **Import and Effect Addition**
  - Import `burnTokenSuccess` action from `tokens-management-store/state/actions`
  - Add `burnTokenSuccess` action to the `tokenSent$` effect to display a green success card

* **Effect Grouping**
  - Group `mintTokenSuccess` and `burnTokenSuccess` actions together in the `tokenSent$` effect
  • Loading branch information
etsraphael committed Oct 14, 2024
1 parent b180524 commit 84e9dd3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions UI/src/app/store/transaction-store/state/effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
loadTransactionsFromBridgeTransferSuccess,
localTransactionSentSuccessfully
} from './actions';
import { mintTokenSuccess } from '../../tokens-management-store/state/actions';
import { mintTokenSuccess, burnTokenSuccess } from '../../tokens-management-store/state/actions';

@Injectable()
export class TransactionEffects {
Expand Down Expand Up @@ -60,10 +60,10 @@ export class TransactionEffects {
);
});

minTokenSent$ = createEffect(() => {
tokenSent$ = createEffect(() => {
return this.actions$.pipe(
ofType(mintTokenSuccess),
map((action: ReturnType<typeof mintTokenSuccess>) => {
ofType(mintTokenSuccess, burnTokenSuccess),
map((action: ReturnType<typeof mintTokenSuccess | typeof burnTokenSuccess>) => {
return localTransactionSentSuccessfully({
card: {
title: $localize`:@@transaction.payment.title:Transaction sent successfully`,
Expand Down

0 comments on commit 84e9dd3

Please sign in to comment.