Skip to content

Commit

Permalink
Merge pull request #585 from EYBlockchain/ilyas/sync-fix
Browse files Browse the repository at this point in the history
Missing `.block` when accessing historical blocks.
  • Loading branch information
ChaitanyaKonda authored Mar 21, 2022
2 parents db0e90f + cb06565 commit a45394b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wallet/src/hooks/User/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const UserProvider = ({ children }) => {
const parsed = JSON.parse(event.data);
if (parsed.type === 'sync') {
parsed.historicalData
.sort((a, b) => a.blockNumberL2 - b.blockNumberL2)
.sort((a, b) => a.block.blockNumberL2 - b.block.blockNumberL2)
.reduce(async (acc, curr) => {
console.log('State', state.zkpKeys.ivk);
await acc; // Acc is a promise so we await it before processing the next one;
Expand Down

0 comments on commit a45394b

Please sign in to comment.