Skip to content

Commit

Permalink
fix: [IOBP-501] Wallet token into new wallet flows (#5398)
Browse files Browse the repository at this point in the history
## Short description
This PR fixes and sets the correct wallet token for the new wallet
flows.

## List of changes proposed in this pull request
- Edited the previous `bpdToken` to `walletToken` to the wallet v3 sagas

## How to test
Start the app in UAT env enabling the pagoPA test toggle, you should be
able to successfully call any wallet v3 API
  • Loading branch information
Hantex9 authored Jan 15, 2024
1 parent 09eab9b commit 02cfc98
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ts/features/walletV3/common/saga/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ import { walletApiBaseUrl, walletApiUatBaseUrl } from "../../../../config";
import { watchWalletDetailsSaga } from "../../details/saga";
import { watchWalletTransactionSaga } from "../../transaction/saga";

export function* watchWalletSaga(bpdToken: string): SagaIterator {
export function* watchWalletSaga(walletToken: string): SagaIterator {
const isPagoPATestEnabled = yield* select(isPagoPATestEnabledSelector);

const walletBaseUrl = isPagoPATestEnabled
? walletApiUatBaseUrl
: walletApiBaseUrl;

const walletClient = createWalletClient(walletBaseUrl, bpdToken);
const paymentClient = createPaymentClient(walletBaseUrl, bpdToken);
const walletClient = createWalletClient(walletBaseUrl, walletToken);
const paymentClient = createPaymentClient(walletBaseUrl, walletToken);

yield* fork(watchWalletOnboardingSaga, walletClient);
yield* fork(watchWalletPaymentSaga, walletClient, paymentClient);
Expand Down
2 changes: 1 addition & 1 deletion ts/sagas/startup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ export function* initializeApplicationSaga(
}

// Start watching for Wallet V3 actions
yield* fork(watchWalletV3Saga, maybeSessionInformation.value.bpdToken);
yield* fork(watchWalletV3Saga, maybeSessionInformation.value.walletToken);

// Load the user metadata
yield* call(loadUserMetadata, backendClient.getUserMetadata, true);
Expand Down

0 comments on commit 02cfc98

Please sign in to comment.