-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Token trade plugin added #521
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please rebase on top of client-2.0
@@ -627,6 +628,31 @@ export class Arc extends GraphNodeObserver { | |||
Logger.debug(`Data saved successfully as ${descriptionHash}`) | |||
return descriptionHash | |||
} | |||
|
|||
public approveTokens(tokenAddress: Address, spender: Address, amount: BN) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any test which cover that ?
const account = '0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1' | ||
const approval = await arc.approveTokens(tokenAddress, account, new BN(1)).send(); | ||
expect(approval.transactionHash).toBeDefined(); | ||
expect(approval.receipt!.status).toEqual(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about reading the token here and make sure there is an approval of 1 wei ?
No description provided.