Skip to content

Commit

Permalink
Updating Lib to match new SC. Manually overriding to fix ts conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
D9J9V committed Sep 2, 2024
1 parent 6bec725 commit 245ca13
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/nextjs/contracts/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,14 @@ export class TriviaFactoryService {
public createTrivia(
questions: Array<string>,
correct_answers: Array<string>,
reward: number | string | bigint,
): TransactionBuilder<{ ok: number } | { err: string }> {
if (!this._program.programId) throw new Error("Program ID is not set");
return new TransactionBuilder<{ ok: number } | { err: string }>(
this._program.api,
this._program.registry,
"send_message",
["TriviaFactory", "CreateTrivia", questions, correct_answers, reward],
"(String, String, Vec<String>, Vec<String>, u128)",
["TriviaFactory", "CreateTrivia", questions, correct_answers],
"(String, String, Vec<String>, Vec<String>)",
"Result<u32, String>",
this._program.programId,
);
Expand Down

0 comments on commit 245ca13

Please sign in to comment.