Skip to content
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

Merged
merged 32 commits into from
Aug 31, 2020
Merged

Conversation

cbrzn
Copy link

@cbrzn cbrzn commented Aug 10, 2020

No description provided.

docker-compose.yml Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
src/arc.ts Show resolved Hide resolved
src/settings.ts Outdated Show resolved Hide resolved
src/token.ts Outdated Show resolved Hide resolved
test/utils.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@orenyodfat orenyodfat left a 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

test/utils.ts Outdated Show resolved Hide resolved
test/utils.ts Outdated Show resolved Hide resolved
src/arc.ts Outdated Show resolved Hide resolved
src/arc.ts Outdated Show resolved Hide resolved
test/utils.ts Outdated Show resolved Hide resolved
@@ -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) {
Copy link
Contributor

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);
Copy link
Contributor

@orenyodfat orenyodfat Aug 30, 2020

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 ?

@orenyodfat orenyodfat merged commit be6b241 into daostack:client-2-0 Aug 31, 2020
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.

None yet

3 participants