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

Delegration (Delegation integration) #110

Merged
merged 19 commits into from
Nov 28, 2017
Merged

Delegration (Delegation integration) #110

merged 19 commits into from
Nov 28, 2017

Conversation

mappum
Copy link
Contributor

@mappum mappum commented Nov 24, 2017

Resolves #24

Sets up a mock API server, with a mocked delegation API which can be un-mocked as soon as it becomes stable. I'm still in the process of integrating the vuex delegation logic with this mock API.

@mappum
Copy link
Contributor Author

mappum commented Nov 27, 2017

I implemented the delegation vuex logic (fetching candidates from API and building txs when delegating) on top of the mock API, so this PR should be ready. Most of the delegation behavior will be inaccessible until we have a way to sign in, which should happen soon with @jolesbi's welcome screen.

Other than some minor UI polish and a way to persist the delegation data in a JSON file, I think we've developed the delegation stuff as far as we can until we wait for the backend to solidify.

Copy link
Collaborator

@faboweb faboweb left a comment

Choose a reason for hiding this comment

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

Nice proxy solution!


const CANDIDATE_INTERVAL = 1000 // update every second
function pubkeyToString (pubkey) {
let type = pubkey.type === 'ed25519' ? '01' : '02'
Copy link
Collaborator

Choose a reason for hiding this comment

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

This would benefit from a comment I think.


console.log('new candidate', candidate)
state.push(candidate)
}
}

const actions = {
async getCandidates ({ commit }) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

here you want "dispatch" instead of "commit" as of line 26

log('baseserver ready')
log('gaia server ready')

if (!TEST) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we maybe introduce a flag "MOCK"?

@@ -6,7 +6,8 @@ const RpcClient = require('tendermint')
let sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms))

module.exports = async function (nodeIP) {
let rest = RestClient()
// TODO: once we're done with the mock API server, switch this from port 8999 to 8998
let rest = RestClient('http://localhost:8999')
Copy link
Collaborator

Choose a reason for hiding this comment

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

And maybe use the "MOCK" flag here to so we can't forget about it.

@faboweb faboweb changed the title WIP: Delegration (Delegation integration) Delegration (Delegation integration) Nov 27, 2017
@faboweb
Copy link
Collaborator

faboweb commented Nov 27, 2017

sorting doesn't work for the candidates list

@jbibla
Copy link
Collaborator

jbibla commented Nov 27, 2017

the name of this PR is 💯

@mappum
Copy link
Contributor Author

mappum commented Nov 27, 2017

@nylira I'm not sure how to get sorting working with this setup, could you help? It looks like the PanelSort component changes the appearance of the column headers, but doesn't update the rows in PageCandidates.

@nylira
Copy link
Contributor

nylira commented Nov 28, 2017

Looking great Matt! @mappum I'll get sorting working in a different PR.

@nylira nylira merged commit 50b3290 into develop Nov 28, 2017
@nylira nylira deleted the matt/24-delegration branch November 28, 2017 02:10
faboweb added a commit that referenced this pull request Jun 2, 2020
* new e2e flow

* changelog

* updated security critical deps

* remove workspace

* forgot to checkout the repo

* correct cache key && cache app deps

* install deps for e2e tets

* update chromedriver

* use npm in machine

* don't use yarn in machine on ci

* correct screenshot settings

* remove experimental flags

* working tests

* fixed test

* old lunie still serves with https

* switch lunie to feature branch

* fixed missing network and updated lunie

* linted

* fixed build script

* use yarn.lock as cache key

* use script from package.json

* merge develop

* use local url in tests

* fix tests by importing the correct account instead of creating one

* switch to working e2e extension branch

* fix tests

* wait for element to be present

* skip moving to portfolio

* switched to latest branches

* switch submodule to master

* switched to master branch fro lunie

* force master checkout

* security update
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.

4 participants