Skip to content

Ankit/add buy voucher with permit - #8

Open
ankitboghra wants to merge 5 commits into
mainfrom
ankit/add-buyVoucher-with-permit
Open

Ankit/add buy voucher with permit#8
ankitboghra wants to merge 5 commits into
mainfrom
ankit/add-buyVoucher-with-permit

Conversation

@ankitboghra

Copy link
Copy Markdown

No description provided.

@ankitboghra
ankitboghra requested a review from Copilot May 19, 2025 08:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new method to delegate amounts using a permit, along with a helper method to generate the permit signature data.

  • Added delegateAmountPOLwithPermit in validator_share.ts, which internally calls buyVoucherWithPermit.
  • Added getPermitData in matic_token.ts to generate permit signature data and updated import dependencies for TYPE_AMOUNT and Converter.

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/contracts/validator_share.ts Added delegateAmountPOLwithPermit to handle delegation with permit for POL tokens.
src/contracts/matic_token.ts Added getPermitData to generate permit data and updated imports to support new types and utilities.
Files not reviewed (1)
  • package.json: Language not supported

Comment thread src/contracts/matic_token.ts Outdated
amount: TYPE_AMOUNT,
spender: string
): Promise<{ v: number; r: string; s: string; deadline: number }> {
debugger

Copilot AI May 19, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the 'debugger' statement to avoid unintended breakpoints in production code.

Suggested change
debugger

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants