From 03d4fbb0591feb8331a3960fc49dc5d6b732354f Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 3 Apr 2024 09:00:21 -0300 Subject: [PATCH] choose ramdomly (#82) --- frontend/claim_sdk/treasury.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/frontend/claim_sdk/treasury.ts b/frontend/claim_sdk/treasury.ts index 46c0509e..51da05c7 100644 --- a/frontend/claim_sdk/treasury.ts +++ b/frontend/claim_sdk/treasury.ts @@ -21,12 +21,7 @@ export const funders = [ ] export function getClaimPayers(claimInfo: ClaimInfo): [PublicKey, PublicKey] { - const buffer = claimInfo.toBuffer() - const toHex = buffer.toString('hex') - const toNumber = parseInt(toHex, 16) - const funderIndex = toNumber % funders.length - - const treasuryIndex = toNumber % treasuries.length - - return [funders[funderIndex], treasuries[treasuryIndex]] + // just choose ramdomly + const index = Math.floor(Math.random() * treasuries.length) + return [funders[index], treasuries[index]] }