Skip to content

Commit

Permalink
same patch for cosmosGovNotifications
Browse files Browse the repository at this point in the history
  • Loading branch information
mhagel committed Feb 7, 2024
1 parent 4100f6d commit 59f61ee
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ export async function fetchLatestCosmosProposalV1(
}
} else nextKey = pagination.next_key;
}

// TODO: temp fix to handle chains that return nextKey as a string instead of Uint8Array
// Our v1 API needs to handle this better. To be addressed in #6610
if (typeof nextKey === 'string') {
nextKey = new Uint8Array(Buffer.from(nextKey, 'base64'));
}
} while (uint8ArrayToNumberBE(nextKey) > 0);

if (finalProposalsPage.length > 0) {
Expand Down

0 comments on commit 59f61ee

Please sign in to comment.