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 Implementation #2055

Merged
merged 34 commits into from
Sep 13, 2020
Merged

Token Trade Implementation #2055

merged 34 commits into from
Sep 13, 2020

Conversation

namesty
Copy link

@namesty namesty commented Aug 11, 2020

Adding UI for token trade schemes, which give individuals the ability to send any ERC20 token they own to the DAO address (or another specified address) via proposal. The individual proposing can also request to receive an any ERC20 token from the DAO (including the DAO’s native token) in that same proposal.

For this first stage, the user will not be able to request reputation back for his contribution.

@roienatan roienatan self-requested a review August 12, 2020 07:19
src/App.tsx Outdated
@@ -1,3 +1,4 @@
import "symbol-observable";
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it related?

Copy link
Author

Choose a reason for hiding this comment

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

I needed this because RxJS was having issues, maybe a package.lock problem. If it works without it, it can just be removed

Copy link
Contributor

Choose a reason for hiding this comment

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

what the verdict re that ? @namesty it can work without it ?

Copy link
Contributor

Choose a reason for hiding this comment

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

removed

public render(): RenderOutput {
const { handleClose } = this.props;

const fnDescription = () => (<span>Short description of the proposal.<ul><li>What are you proposing to do?</li><li>Why is it important?</li><li>How much will it cost the DAO?</li></ul></span>);
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, please use i18next.
see line 578 in CreatePluginManagerProposal.tsx

component={MarkdownField}
onChange={(value: any) => { setFieldValue("description", value); }}
id="descriptionInput"
placeholder="Describe your proposal in greater detail"
Copy link
Contributor

Choose a reason for hiding this comment

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

i18next

@roienatan
Copy link
Contributor

Please resolve conflicts

package.json Outdated
@@ -149,7 +149,7 @@
},
"devDependencies": {
"@babel/plugin-syntax-dynamic-import": "^7.7.4",
"@daostack/test-env-experimental": "4.0.17",
"@dorgtech/test-env-experimental": "4.0.20",
Copy link
Contributor

Choose a reason for hiding this comment

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

Is dorg taking over maintenance of test-env? Why is this not @daostack?

Copy link
Contributor

Choose a reason for hiding this comment

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

Nope, we were just using it because daostack haven't released the test-env with the updated subgraph (that has the token trade plugin). I think we should modify once daostack does the release of the new test-env (so we can test in the meantime)

Copy link
Contributor

@dkent600 dkent600 left a comment

Choose a reason for hiding this comment

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

Would be great if you can describe in the description of the PR what is the basic functionality/purpose of this new scheme.

@dkent600 dkent600 temporarily deployed to alchemy-token-trade-anp33kvhn3 August 12, 2020 12:14 Inactive
namesty and others added 4 commits August 12, 2020 20:51
* Updated arc.js, test env and subgraph

* join and quit --> join to match new arc.js

* updated doc to Join instead of JoinAndQuit
@orenyodfat orenyodfat temporarily deployed to alchemy-token-trade-95u6cxxzg1 August 16, 2020 21:34 Inactive
roienatan and others added 8 commits August 17, 2020 10:00
* updated documentation regarding i18next

* updated with global variables for styling

* example added

* better example
* upgrade provider packages

* update package-lock

* remove webpack from dependencies

* package-lock

* lint

* refactor, fix bugs

* better console info on errors

* clean up account profile loguc

* remove unused webReducer stuff

* merge conflict errors

* added some i18next

* upgrade provider packages

* remove webpack from dependencies

* package-lock

* refactor, fix bugs

* better console info on errors

* clean up account profile loguc

* merge conflict errors

* added some i18next

* package-lock

* 3box fix for identity-wallet

* fix bug in SAVE_THREEBOX

* revert to 3box 1.20.3

* fix error in follow

* remove Try Edit button

* clean up canEdit logic

* remove console.log statements

* fix merge conflict

* fix compile error

* Update translation.json

* update package-lock
* fething daos balances

* Support for DAOs total holdings ; sorting by total holdings

* Update translation.json

Missing comma after resolving conflicts.
@roienatan
Copy link
Contributor

Please make sure the review app deployment success so we can test.

@cbrzn
Copy link
Contributor

cbrzn commented Aug 24, 2020

Please make sure the review app deployment success so we can test.

@roienatan hello sir! travis wont be happy until the arc.js version with the token trade plugin is released (we were doing npm link to test locally). would it be possible that you check the PR and help us with that daostack/arc.js#521? Would love to deliver this ASAP

roienatan and others added 5 commits August 30, 2020 13:57
* updated chrome driver for tests

* updated version also for seleniumArgs

* automatic update to the latest chrome driver

* updated webdriverio

* updated selenium

* Update .travis.yml

Removing auto version fetch as I'm not sure if it's working properly right now.
Will check it next time.
@@ -198,6 +198,10 @@
margin-right: 7px;
}

.bold {
font-weight: bold;
Copy link
Contributor

Choose a reason for hiding this comment

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

how this is related to this pr ?

Copy link
Contributor

Choose a reason for hiding this comment

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

this was to make the proposal ui good looking

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 add test which cover the tokenTrade scheme

@roienatan roienatan self-requested a review September 9, 2020 22:21
@roienatan roienatan temporarily deployed to alchemy-token-trade-es5bl2qg1a September 10, 2020 08:47 Inactive
@roienatan roienatan self-requested a review September 10, 2020 14:39
@roienatan
Copy link
Contributor

Can't create proposals on Rinkeby, get a metamask error:
Create proposal: transaction failed :-( - gas required exceeds allowance (10000000) or always failing transaction

Creating on ganache is okay.

@orenyodfat orenyodfat temporarily deployed to alchemy-token-trade-es5bl2qg1a September 10, 2020 14:57 Inactive
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 add tokenTrade to https://github.com/dOrgTech/alchemy/blob/token-trade/src/lib/pluginUtils.ts#L37 to REQUIRED_PLUGIN_PERMISSIONS

@cbrzn
Copy link
Contributor

cbrzn commented Sep 10, 2020

please add tokenTrade to https://github.com/dOrgTech/alchemy/blob/token-trade/src/lib/pluginUtils.ts#L37 to REQUIRED_PLUGIN_PERMISSIONS

Gotcha. Just added @orenyodfat

@orenyodfat orenyodfat temporarily deployed to alchemy-token-trade-es5bl2qg1a September 10, 2020 15:18 Inactive
@orenyodfat orenyodfat merged commit 3e1e554 into daostack:dev-2 Sep 13, 2020
orenyodfat pushed a commit that referenced this pull request Oct 4, 2020
* [WIP] Token Trade Plugin

* CreateProposal and ProposalSummary created for TokenTrade (untested)

* Token trade fixes for BN.js amoun types

* [WIP] Create token trade proposal

* updating images

* TokenTrade proposal summary fixed

* Eliminated console.logs

* Updated arc.js, test env and subgraph (#2072)

* Updated arc.js, test env and subgraph

* join and quit --> join to match new arc.js

* updated doc to Join instead of JoinAndQuit

* Form service - i18next

* [WIP] styling details

* Plugin manager create proposal modal has a left border and padding like the other modals (#2071)

* fix UI where votes screwed up (#2070)

* Better UI for DAO history page (#2069)

* Update documentation (#2062)

* updated documentation regarding i18next

* updated with global variables for styling

* example added

* better example

* refactor and fix issues relating 3box operations (#2018)

* upgrade provider packages

* update package-lock

* remove webpack from dependencies

* package-lock

* lint

* refactor, fix bugs

* better console info on errors

* clean up account profile loguc

* remove unused webReducer stuff

* merge conflict errors

* added some i18next

* upgrade provider packages

* remove webpack from dependencies

* package-lock

* refactor, fix bugs

* better console info on errors

* clean up account profile loguc

* merge conflict errors

* added some i18next

* package-lock

* 3box fix for identity-wallet

* fix bug in SAVE_THREEBOX

* revert to 3box 1.20.3

* fix error in follow

* remove Try Edit button

* clean up canEdit logic

* remove console.log statements

* fix merge conflict

* fix compile error

* Update translation.json

* update package-lock

* fix issue when a proposal card is not always clickable (#2077)

* revert subgraph endpoint domain (#2078)

* Support DAOs sort by total holdings (#2085)

* fething daos balances

* Support for DAOs total holdings ; sorting by total holdings

* Update translation.json

Missing comma after resolving conflicts.

* Styling for Token Trade Proposal Summary and Changed JoinAndQuit naming

* Merge fixes

* Added package.lock

* Minor adjustments due to changes in DAOs balances serivce that now returns balances only for registered DAOs (#2089)

* bumping arc.js version

* Updated chrome driver for tests (#2093)

* updated chrome driver for tests

* updated version also for seleniumArgs

* automatic update to the latest chrome driver

* updated webdriverio

* updated selenium

* Update .travis.yml

Removing auto version fetch as I'm not sure if it's working properly right now.
Will check it next time.

* dev-2 merged

* lint error fix

* fix lint

* removed unused import

* added token trade to required plugin permissions object

Co-authored-by: cbrzn <cesarbrazon10@gmail.com>
Co-authored-by: roienatan <34843014+roienatan@users.noreply.github.com>
Co-authored-by: Doug Kent <dkent600@users.noreply.github.com>
orenyodfat added a commit that referenced this pull request Oct 4, 2020
* Updated arc.js, test env and subgraph (#2072)

* Updated arc.js, test env and subgraph

* join and quit --> join to match new arc.js

* updated doc to Join instead of JoinAndQuit

* refactor and fix issues relating 3box operations (#2018)

* upgrade provider packages

* update package-lock

* remove webpack from dependencies

* package-lock

* lint

* refactor, fix bugs

* better console info on errors

* clean up account profile loguc

* remove unused webReducer stuff

* merge conflict errors

* added some i18next

* upgrade provider packages

* remove webpack from dependencies

* package-lock

* refactor, fix bugs

* better console info on errors

* clean up account profile loguc

* merge conflict errors

* added some i18next

* package-lock

* 3box fix for identity-wallet

* fix bug in SAVE_THREEBOX

* revert to 3box 1.20.3

* fix error in follow

* remove Try Edit button

* clean up canEdit logic

* remove console.log statements

* fix merge conflict

* fix compile error

* Update translation.json

* update package-lock

* Support DAOs sort by total holdings (#2085)

* fething daos balances

* Support for DAOs total holdings ; sorting by total holdings

* Update translation.json

Missing comma after resolving conflicts.

* Minor adjustments due to changes in DAOs balances serivce that now returns balances only for registered DAOs (#2089)

* Updated chrome driver for tests (#2093)

* updated chrome driver for tests

* updated version also for seleniumArgs

* automatic update to the latest chrome driver

* updated webdriverio

* updated selenium

* Update .travis.yml

Removing auto version fetch as I'm not sure if it's working properly right now.
Will check it next time.

* updated dependencies (#2096)

* updated arc.js 54 (#2109)

* release dev-2 to master-2 (#2079)

* Updated arc.js, test env and subgraph (#2072)

* Updated arc.js, test env and subgraph

* join and quit --> join to match new arc.js

* updated doc to Join instead of JoinAndQuit

* Plugin manager create proposal modal has a left border and padding like the other modals (#2071)

* fix UI where votes screwed up (#2070)

* Better UI for DAO history page (#2069)

* Update documentation (#2062)

* updated documentation regarding i18next

* updated with global variables for styling

* example added

* better example

* refactor and fix issues relating 3box operations (#2018)

* upgrade provider packages

* update package-lock

* remove webpack from dependencies

* package-lock

* lint

* refactor, fix bugs

* better console info on errors

* clean up account profile loguc

* remove unused webReducer stuff

* merge conflict errors

* added some i18next

* upgrade provider packages

* remove webpack from dependencies

* package-lock

* refactor, fix bugs

* better console info on errors

* clean up account profile loguc

* merge conflict errors

* added some i18next

* package-lock

* 3box fix for identity-wallet

* fix bug in SAVE_THREEBOX

* revert to 3box 1.20.3

* fix error in follow

* remove Try Edit button

* clean up canEdit logic

* remove console.log statements

* fix merge conflict

* fix compile error

* Update translation.json

* update package-lock

* fix issue when a proposal card is not always clickable (#2077)

* revert subgraph endpoint domain (#2078)

Co-authored-by: roienatan <34843014+roienatan@users.noreply.github.com>
Co-authored-by: Doug Kent <dkent600@users.noreply.github.com>

* Updated daocreator version (#2114)

* updated daocreator version

* updated package lock

* updated arc.js version to 55 (#2130)

* Token Trade Implementation (#2055)

* [WIP] Token Trade Plugin

* CreateProposal and ProposalSummary created for TokenTrade (untested)

* Token trade fixes for BN.js amoun types

* [WIP] Create token trade proposal

* updating images

* TokenTrade proposal summary fixed

* Eliminated console.logs

* Updated arc.js, test env and subgraph (#2072)

* Updated arc.js, test env and subgraph

* join and quit --> join to match new arc.js

* updated doc to Join instead of JoinAndQuit

* Form service - i18next

* [WIP] styling details

* Plugin manager create proposal modal has a left border and padding like the other modals (#2071)

* fix UI where votes screwed up (#2070)

* Better UI for DAO history page (#2069)

* Update documentation (#2062)

* updated documentation regarding i18next

* updated with global variables for styling

* example added

* better example

* refactor and fix issues relating 3box operations (#2018)

* upgrade provider packages

* update package-lock

* remove webpack from dependencies

* package-lock

* lint

* refactor, fix bugs

* better console info on errors

* clean up account profile loguc

* remove unused webReducer stuff

* merge conflict errors

* added some i18next

* upgrade provider packages

* remove webpack from dependencies

* package-lock

* refactor, fix bugs

* better console info on errors

* clean up account profile loguc

* merge conflict errors

* added some i18next

* package-lock

* 3box fix for identity-wallet

* fix bug in SAVE_THREEBOX

* revert to 3box 1.20.3

* fix error in follow

* remove Try Edit button

* clean up canEdit logic

* remove console.log statements

* fix merge conflict

* fix compile error

* Update translation.json

* update package-lock

* fix issue when a proposal card is not always clickable (#2077)

* revert subgraph endpoint domain (#2078)

* Support DAOs sort by total holdings (#2085)

* fething daos balances

* Support for DAOs total holdings ; sorting by total holdings

* Update translation.json

Missing comma after resolving conflicts.

* Styling for Token Trade Proposal Summary and Changed JoinAndQuit naming

* Merge fixes

* Added package.lock

* Minor adjustments due to changes in DAOs balances serivce that now returns balances only for registered DAOs (#2089)

* bumping arc.js version

* Updated chrome driver for tests (#2093)

* updated chrome driver for tests

* updated version also for seleniumArgs

* automatic update to the latest chrome driver

* updated webdriverio

* updated selenium

* Update .travis.yml

Removing auto version fetch as I'm not sure if it's working properly right now.
Will check it next time.

* dev-2 merged

* lint error fix

* fix lint

* removed unused import

* added token trade to required plugin permissions object

Co-authored-by: cbrzn <cesarbrazon10@gmail.com>
Co-authored-by: roienatan <34843014+roienatan@users.noreply.github.com>
Co-authored-by: Doug Kent <dkent600@users.noreply.github.com>

* fix wrong plugin name (#2136)

* Update travis.yml to run test coverage (#2132)

* update travis.yml to run test coverage

* added coverall and configurations

* added more coverage configurations

* updated configurations

* modify travis.yml

* update travis node js version

* Update .travis.yml

* Update package.json

Co-authored-by: orenyodfat <orenyodfat@users.noreply.github.com>

* fix no side bar modal scrolling (#2141)

* Update arc.js 56 ; use polling (#2140)

* update arc.js 56

* use polling

* polling in redemptions page

* change all subscribe to polling

* fix proposals counters

* fix staking data not automatically updated

* fix redemption test

* run all tests

* fix failure in proposal summery

* missing redeem button in proposal summary

* remove unnecessary comments

* added global variable to graph poll interval ; updated interval to 30 seconds

* Support Join and FundingRequest creation in PluginManager (#2144)

* added support for join and fr on plugin manager ; need to update arc.js to proceed

* fix error of property pluginName does not exist on type never

* Robust UI to the Enable Predictions button to look good on both Windows and Mac (#2149)

* Added fieldset to Add params and Remove params to distinguish between them (#2157)

Co-authored-by: roienatan <34843014+roienatan@users.noreply.github.com>
Co-authored-by: Doug Kent <dkent600@users.noreply.github.com>
Co-authored-by: Nestor Amesty <nestor09amesty@gmail.com>
Co-authored-by: cbrzn <cesarbrazon10@gmail.com>
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

5 participants