Skip to content

Commit

Permalink
chore: squash requests
Browse files Browse the repository at this point in the history
  • Loading branch information
guanbinrui committed Feb 27, 2024
1 parent 204b806 commit b9bf800
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/web3-providers/src/NextID/proof.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { staleNextIDCached } from './helpers.js'
import PRESET_LENS from './preset-lens.json'
import { fetchJSON, fetchSquashedJSON } from '../helpers/fetchJSON.js'
import type { NextIDBaseAPI } from '../entry-types.js'
import { stableSquashedCached } from '../entry-helpers.js'
import { Expiration, stableSquashedCached } from '../entry-helpers.js'
import { env } from '@masknet/flags'

const BASE_URL =
Expand Down Expand Up @@ -233,7 +233,9 @@ function getExistedBindingQueryURL(platform: string, identity: string, personaPu
}

function fetchFromProofService<T>(request: Request | RequestInfo, init?: RequestInit) {
return fetchJSON<T>(request, init)
return fetchJSON<T>(request, init, {
squashExpiration: Expiration.ONE_MINUTE,
})
}

export class NextIDProof {
Expand Down

0 comments on commit b9bf800

Please sign in to comment.