Skip to content

Commit

Permalink
fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Ridel1e committed Oct 4, 2023
1 parent 87c9659 commit dc9b1f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/network/cardano/api/rewards/claimRewards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ import {
} from '../operations/common/inputSelector';
import { submitTx } from '../operations/common/submitTxCandidate';
import {
combineRequests,
RawReward,
rewardAsset,
RewardsData,
rewardsRequest,
RewardStatus,
updateRewards$,
} from './rewards';
Expand Down Expand Up @@ -188,7 +188,7 @@ export const claimRewards = (rewardsData: RewardsData): Observable<TxId> => {
first(),
switchMap((addresses) =>
combineLatest([
rewardsRequest(addresses as string[]),
combineRequests(addresses as string[]),
rewardsRequestStatusRequest(addresses as string[]),
]),
),
Expand Down
6 changes: 3 additions & 3 deletions src/network/cardano/api/rewards/rewards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ const requestRewards = (
catchError(() => of(undefined)),
);

const combineRequests = (
export const combineRequests = (
allAddresses: string[],
): Observable<RawRewardResponse | undefined> => {
): Observable<RewardsData | undefined> => {
const addressesBatch: string[][] = [[]];

for (const address of allAddresses) {
Expand Down Expand Up @@ -252,6 +252,7 @@ const combineRequests = (
{ rewards: [], upcoming: { sp0: 0, sp1: 0 } },
);
}),
map((data) => (data ? buildRewardsData(data) : undefined)),
);
};

Expand All @@ -264,7 +265,6 @@ export const rewards$ = getAddresses().pipe(
),
),
switchMap((addresses) => combineRequests(addresses as string[])),
map((data) => (data ? buildRewardsData(data) : undefined)),
publishReplay(1),
refCount(),
);

0 comments on commit dc9b1f8

Please sign in to comment.