Skip to content

Commit

Permalink
fix: undo vote in old killed gauge
Browse files Browse the repository at this point in the history
  • Loading branch information
agualis committed Jul 4, 2024
1 parent 4e0e606 commit 0d7763d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/services/contracts/gauge-controller.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ export default class GaugeControllerService {
weights: BigNumber[],
options: Record<string, any> = {}
): Promise<TransactionResponse> {
// Temporary fix for edge-case.
const userAddress = await this.walletService.getUserAddress();
if (userAddress === '0x53A385d47D3a011539Ec377f53aCB410F53ff97d') {
console.log('Applying vote fix...');
// Delete last element
gaugeAddresses.pop();
weights.pop();
// Prepend zero vote to old gauge
gaugeAddresses.unshift('0x88D07558470484c03d3bb44c3ECc36CAfCF43253');
weights.unshift(BigNumber.from(0));
}

return await this.walletService.txBuilder.contract.sendTransaction({
contractAddress: this.address,
abi: this.abi,
Expand Down

0 comments on commit 0d7763d

Please sign in to comment.