Remove mentions of Ethereum from UI and code, refactor wallet connect #214
@@ -1,6 +1,6 @@
|
||||
<form onsubmit={{action "submit"}}>
|
||||
<p>
|
||||
<label for="c-account">Ethereum account</label>
|
||||
<label for="c-account">Rootstock account</label>
|
||||
<Input @type="text"
|
||||
@value={{this.account}}
|
||||
name="account" id="c-account"
|
||||
|
||||
@@ -9,11 +9,11 @@ export default Controller.extend({
|
||||
|
||||
kredits: service(),
|
||||
|
||||
ethAddress: null,
|
||||
accountAddress: null,
|
||||
githubAccessToken: alias('kredits.githubAccessToken'),
|
||||
|
||||
isValidEthAccount: computed('ethAddress', function() {
|
||||
return isAddress(this.ethAddress);
|
||||
isValidEthAccount: computed('accountAddress', function() {
|
||||
return isAddress(this.accountAddress);
|
||||
}),
|
||||
|
||||
signupButtonDisabled: not('isValidEthAccount'),
|
||||
@@ -23,7 +23,7 @@ export default Controller.extend({
|
||||
completeSignup () {
|
||||
const payload = {
|
||||
accessToken: this.githubAccessToken,
|
||||
account: this.ethAddress
|
||||
account: this.accountAddress
|
||||
}
|
||||
|
||||
fetch(config.githubSignupUrl, {
|
||||
@@ -37,7 +37,7 @@ export default Controller.extend({
|
||||
|
||||
this.setProperties({
|
||||
githubAccessToken: null,
|
||||
ethAddress: null
|
||||
accountAddress: null
|
||||
});
|
||||
|
||||
this.transitionToRoute('signup.complete');
|
||||
+1
-1
@@ -26,7 +26,7 @@ Router.map(function() {
|
||||
});
|
||||
this.route('signup', function() {
|
||||
this.route('github');
|
||||
this.route('eth-account');
|
||||
this.route('account');
|
||||
this.route('complete');
|
||||
});
|
||||
this.route('budget', function() {
|
||||
|
||||
@@ -22,7 +22,7 @@ export default Route.extend({
|
||||
|
||||
this.kredits.set('githubAccessToken', accessToken);
|
||||
|
||||
this.transitionTo('signup.eth-account');
|
||||
this.transitionTo('signup.account');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<header>
|
||||
<h2>Complete your contributor profile</h2>
|
||||
</header>
|
||||
<div class="content text-lg">
|
||||
<p class="mb-8">
|
||||
Kredits allow you to to earn rewards for your contributions, in the form of
|
||||
dynamic open-source grants. As a regular contributor, you can also take
|
||||
part in the community's project governance and finances.
|
||||
</p>
|
||||
<p>
|
||||
In order to interact with the system you will need a <a
|
||||
href="https://rootstock.io">Rootstock</a> wallet/account.
|
||||
</p>
|
||||
<form>
|
||||
<p>
|
||||
<label>
|
||||
Rootstock account:<br>
|
||||
<Input @type="text" @value={{this.accountAddress}} placeholder="0xF18E631Ea191aE4ebE70046Fcb01a436554421BA4" class={{if this.isValidEthAccount "valid" ""}} />
|
||||
</label>
|
||||
</p>
|
||||
</form>
|
||||
<p class="actions">
|
||||
<button disabled={{this.signupButtonDisabled}}
|
||||
onclick={{action "completeSignup"}}
|
||||
type="button">
|
||||
Complete my profile
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
@@ -1,24 +0,0 @@
|
||||
<header>
|
||||
<h2>Complete your contributor profile</h2>
|
||||
</header>
|
||||
<div class="content text-lg">
|
||||
<p class="mb-8">
|
||||
Kredits allow you to take part in project governance, and to earn rewards for
|
||||
your contributions. For both, you will need an Ethereum wallet/account.
|
||||
</p>
|
||||
<form>
|
||||
<p>
|
||||
<label>
|
||||
Ethereum account:<br>
|
||||
<Input @type="text" @value={{this.ethAddress}} placeholder="0xF18E631Ea191aE4ebE70046Fcb01a436554421BA4" class={{if this.isValidEthAccount "valid" ""}} />
|
||||
</label>
|
||||
</p>
|
||||
</form>
|
||||
<p class="actions">
|
||||
<button disabled={{this.signupButtonDisabled}}
|
||||
onclick={{action "completeSignup"}}
|
||||
type="button">
|
||||
Complete my profile
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Route | signup/eth-account', function(hooks) {
|
||||
module('Unit | Route | signup/account', function(hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let route = this.owner.lookup('route:signup/eth-account');
|
||||
let route = this.owner.lookup('route:signup/account');
|
||||
assert.ok(route);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user