Merge branch 'community_gdd_float_balance' of github.com:gradido/gradido into community_gdd_float_balance

This commit is contained in:
einhornimmond 2021-05-04 14:19:33 +02:00
commit a928d7324a
4 changed files with 6 additions and 5 deletions

View File

@ -176,7 +176,7 @@ Wenn alles okay:
"type": "creation|send|receive", "type": "creation|send|receive",
"transaction_id": <transaction_id>, // db id not id from blockchain "transaction_id": <transaction_id>, // db id not id from blockchain
"date": "<date string>", "date": "<date string>",
"balance": <GDD balance in GDD cent /10000>, "balance": <GDD balance in GDD cent>,
"memo": "<Verwendungszweck>", "memo": "<Verwendungszweck>",
"pubkey": "<other_user.public_key in hex>" "pubkey": "<other_user.public_key in hex>"
@ -319,7 +319,7 @@ Wenn alles okay:
"type": "creation|send|receive", "type": "creation|send|receive",
"transaction_id": <transaction_id>, // db id not id from blockchain "transaction_id": <transaction_id>, // db id not id from blockchain
"date": "<date string>", "date": "<date string>",
"balance": <GDD balance in GDD cent /10000>, "balance": <GDD balance in GDD cent>,
"memo": "<Verwendungszweck>", "memo": "<Verwendungszweck>",
"pubkey": "<other_user.public_key in hex>" "pubkey": "<other_user.public_key in hex>"

View File

@ -255,6 +255,7 @@ export default {
const result = await communityAPI.send( const result = await communityAPI.send(
this.$store.state.session_id, this.$store.state.session_id,
this.ajaxCreateData.email, this.ajaxCreateData.email,
// better to send the user's input here?
this.ajaxCreateData.amount * 10000, this.ajaxCreateData.amount * 10000,
this.ajaxCreateData.memo, this.ajaxCreateData.memo,
this.ajaxCreateData.target_date, this.ajaxCreateData.target_date,

View File

@ -22,7 +22,7 @@
style="color: green" style="color: green"
></b-icon> ></b-icon>
<h1 class="mb-1"> <h1 class="mb-1">
{{ $n(item.balance / 10000) }} {{ $n(item.balance) }}
<small>GDD</small> <small>GDD</small>
</h1> </h1>
<h2 class="text-muted">{{ item.name }}</h2> <h2 class="text-muted">{{ item.name }}</h2>

View File

@ -94,7 +94,7 @@ export default {
async loadBalance() { async loadBalance() {
const result = await communityAPI.balance(this.$store.state.session_id) const result = await communityAPI.balance(this.$store.state.session_id)
if (result.success) { if (result.success) {
this.balance = result.result.data.balance / 10000 this.balance = result.result.data.balance // / 10000
} else { } else {
// what to do when loading balance fails? // what to do when loading balance fails?
} }
@ -102,7 +102,7 @@ export default {
async loadGDTBalance() { async loadGDTBalance() {
const result = await communityAPI.transactions(this.$store.state.session_id) const result = await communityAPI.transactions(this.$store.state.session_id)
if (result.success) { if (result.success) {
this.GdtBalance = result.result.data.gdtSum / 10000 this.GdtBalance = result.result.data.gdtSum // / 10000
} else { } else {
// what to do when loading balance fails? // what to do when loading balance fails?
} }