Skip to content

Commit

Permalink
fix 0 nonce check (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
rajranjan0608 committed Feb 13, 2024
1 parent b7478a4 commit 728baa5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mainnetCheckService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class MainnetCheckService {
response.isValid = true
} else {
const currentNonce = await getNonce(this.RPC, address)
if (!currentNonce) {
if (!currentNonce && currentNonce !== 0) {
response.internalError = true
return response
}
Expand Down Expand Up @@ -104,9 +104,9 @@ export class MainnetCheckService {

async updateAddressStatus(address: string, checkCount: number = 0, nonce?: number): Promise<AddressStatus | undefined> {
// if nonce is not provided, fetch from network
if (!nonce) {
if (!nonce && nonce !== 0) {
const currentNonce = await getNonce(this.RPC, address)
if (!currentNonce) {
if (!currentNonce && currentNonce !== 0) {
return
}
nonce = currentNonce
Expand Down

0 comments on commit 728baa5

Please sign in to comment.