Switch from ETH/WBTC to RBTC/BTC

This commit is contained in:
2022-05-22 17:02:54 +02:00
parent 6cd62d3764
commit 44b631c688
7 changed files with 17 additions and 17 deletions
@@ -115,14 +115,14 @@ export default class AddReimbursementComponent extends Component {
@action
submit (e) {
e.preventDefault();
if (!this.kredits.currentUser) { window.alert('You need to connect your Ethereum account first.'); return false }
if (!this.kredits.currentUser) { window.alert('You need to connect your RSK account first.'); return false }
if (!this.kredits.currentUserIsCore) { window.alert('Only core contributors can submit reimbursements.'); return false }
const contributor = this.contributors.findBy('id', parseInt(this.recipientId));
const attributes = {
amount: parseInt(parseFloat(this.total) * 100000000), // convert to sats
token: config.tokens['WBTC'],
token: config.tokens['BTC'],
recipientId: parseInt(this.recipientId),
title: `Expenses covered by ${contributor.name}`,
description: this.description,
@@ -12,7 +12,7 @@
</label>
<fieldset class="horizontal thirds total-amounts">
<label>
<p class="label">Total amount (WBTC):</p>
<p class="label">Total amount (BTC):</p>
<p>
<Input @type="text"
@placeholder="0.0015"
@@ -8,7 +8,7 @@
</p>
<p class="token-amount">
<span class="amount">
{{sats-to-btc reimbursement.amount}}</span>&#8239;<span class="symbol">WBTC</span>
{{sats-to-btc reimbursement.amount}}</span>&#8239;<span class="symbol">BTC</span>
</p>
<ul class="expense-list">
{{#each reimbursement.expenses as |expense|}}
+2 -2
View File
@@ -6,10 +6,10 @@ export default helper(function fmtCryptoCurrency(params/*, hash*/) {
const code = params[1];
switch(code) {
case 'ETH':
case 'RBTC':
fmtAmount = amount / 1000000000000000000;
break;
case 'WBTC':
case 'BTC':
fmtAmount = amount / 100000000;
break;
}
+2 -2
View File
@@ -32,10 +32,10 @@ export default class CommunityFundsService extends Service {
// ERC20 token, has all meta data
this.balances.pushObject(balance);
} else {
// ETH, missing meta data
// RBTC, missing meta data
this.balances.pushObject({
...balance,
...{ token: { name: 'Ether', symbol: 'ETH'} }
...{ token: { name: 'RBTC', symbol: 'RBTC'} }
});
}
}