Skip to content

Commit

Permalink
fix indexer (#459)
Browse files Browse the repository at this point in the history
  • Loading branch information
MSghais authored Feb 3, 2025
1 parent 2951747 commit f308717
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions apps/nestjs-indexer/src/indexer/tip-service.indexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ export class TipServiceIndexer {
transaction: starknet.ITransaction,
) {
try {
this.logger.error(error); const commonTxData = this.getTxData(header, transaction);
const commonTxData = this.getTxData(header, transaction);

/* eslint-disable @typescript-eslint/no-unused-vars */
const [
Expand Down Expand Up @@ -334,7 +334,6 @@ export class TipServiceIndexer {

} catch (error) {
this.logger.error(error);

}

}
Expand Down
8 changes: 4 additions & 4 deletions onchain/cairo/afk/src/account/nostr_account.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ pub mod NostrAccount {
}

fn init_nostr_account(ref self: ContractState) {
assert!(self.private_key.read().is_zero(), "account already initialized");
// assert!(self.private_key.read().is_zero(), "account already initialized");
if !self.starknet_address.read().is_zero() {
assert!(get_caller_address() == self.starknet_address.read(), "invalid caller");
}
Expand All @@ -156,9 +156,9 @@ pub mod NostrAccount {
// add random salt with signature and save its
let salt: felt252 = 228282189421094;

let commitment = pedersen_commit(private_key, salt, H);
let is_valid = verify_commitment(commitment, private_key, salt, H);
assert(is_valid, 'The commitment is not valid');
// let commitment = pedersen_commit(private_key, salt, H);
// let is_valid = verify_commitment(commitment, private_key.try_into().unwrap(), salt, H);
// assert(is_valid, 'The commitment is not valid');

self.private_key.write(private_key);
// self.nostr_public_key.write(public_key);
Expand Down

0 comments on commit f308717

Please sign in to comment.