Skip to content

Commit 63df3e5

Browse files
🐛 Fix fetchAllLeaderboardAccounts (#7)
1 parent 0ec46a9 commit 63df3e5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

client/sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@magicblock-labs/soar-sdk",
3-
"version": "0.1.20",
3+
"version": "0.1.21",
44
"description": "Sdk bindings for the SOAR smart contract.",
55
"repository": {
66
"type": "git",

client/sdk/src/soar.program.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -661,12 +661,12 @@ export class SoarProgram {
661661
public async fetchAllLeaderboardAccounts(
662662
memcmp?: Buffer | GetProgramAccountsFilter[]
663663
): Promise<LeaderBoardAccount[]> {
664-
const achievements = await this.program.account.achievement.all(memcmp);
664+
const leaderboards = await this.program.account.leaderBoard.all(memcmp);
665665

666-
return achievements.map((achievement) =>
666+
return leaderboards.map((leaderboard) =>
667667
LeaderBoardAccount.fromIdlAccount(
668-
achievement.account,
669-
achievement.publicKey
668+
leaderboard.account,
669+
leaderboard.publicKey
670670
)
671671
);
672672
}

0 commit comments

Comments
 (0)