Commit 58d8fbce authored by Bitcoin Please's avatar Bitcoin Please

Added recipient address to display.

parent b31c4fdc
......@@ -57,34 +57,18 @@
</router-link>
</li>
<li>
<a href="javascript://">
Causes<i class="fa fa-caret-down" aria-hidden="true"></i>
</a>
<ul class="sub-menu">
<li>
<!-- <router-link to="/create"> -->
<router-link to="/">
Create a cause
</router-link>
</li>
<li>
<!-- <router-link to="/manage"> -->
<router-link to="/">
Manage a cause
</router-link>
</li>
</ul>
</li>
<li>
<router-link to="/contact">
Contact
</router-link>
</li>
<li v-if="hasAuth">
<router-link :to="'/@' + getNickname + '/create'">
<strong class="text-danger">Create</strong>
</router-link>
</li>
<li v-if="hasAuth">
<a href="javascript://">
My Account<i class="fa fa-caret-down" aria-hidden="true"></i>
......
......@@ -72,6 +72,15 @@
<span v-if="campaignModel == 'Community Pledge'"></span>
</div>
<div v-if="recipient" class="receipient-address">
<a :href="'https://explorer.bitcoin.com/bch/address/' + recipient" target="_blank">
<i class="fa fa-check-circle text-success ml-2 mr-1"></i>
<span class="text-secondary">{{recipient}}</span>
</a>
(<a href="javascript://">view proof</a>)
</div>
<div v-if="campaignModel == 'Community Pledge'" class="row process-info">
<div class="col">
<span>{{fundingGoal}}</span>
......@@ -148,9 +157,9 @@
Add my support
</a>
<a href="javascript://" class="btn-danger mr-5" @click="burn">
<i class="fa fa-fire mr-2" aria-hidden="true"></i>
Burn PIF
<a href="javascript://" class="btn-warning mr-5" @click="stakePIF">
<i class="fa fa-flag mr-2" aria-hidden="true"></i>
Stake PIF
</a>
<a href="javascript://" class="btn-secondary" @click="remindMe">
......@@ -351,6 +360,40 @@ export default {
}
},
recipient() {
if (this.campaign && (this.campaign.assurances || this.campaign.payouts)) {
if (this.campaign.assurances) {
const assuranceid = 0
/* Set recipient. */
const recipient = this.campaign.assurances[assuranceid].recipient
/* Validate recipient. */
if (!recipient) {
return ''
}
/* Return recipient address. */
return recipient.address
}
if (this.campaign.payouts) {
/* Set recipient. */
const recipient = this.campaign.payouts.recipient
/* Validate recipient. */
if (!recipient) {
return ''
}
/* Return recipient address. */
return recipient.address
}
}
return ''
},
/**
* Pledge Address
*
......@@ -691,10 +734,10 @@ export default {
},
/**
* Burn PIF
* Stake PIF
*/
burn() {
this.toast(['Oops!', 'You have no PIF to burn', 'error'])
stakePIF() {
this.toast(['Oops!', 'You have no PIF to stake', 'error'])
// this.showActions = false
// this.showBurn = true
......@@ -763,4 +806,12 @@ export default {
font-size: 0.7em;
font-style: italic;
}
.receipient-address {
font-size: 0.8em;
margin-top: -10px;
}
.receipient-address a {
display: inline-block;
}
</style>
......@@ -374,6 +374,12 @@ export default {
if (remaining <= 0) {
this.broadcast()
}
/* Set message. */
const message = `Your pledge has been accepted!`
/* Display notification. */
this.toast(['Done!', message, 'success'])
} catch (err) {
console.error(err)
}
......
......@@ -278,7 +278,7 @@
<p>
You'll earn <a href="https://pif.cash" target="_blank"><strong>PIF SLP tokens</strong></a> for every dollar you contribute to the DAO.
Then <strong><em>Burn PIF</em></strong> to vote in favor or your favorite campaigns.
Then <strong><em>Stake PIF</em></strong> to vote in favor or your favorite campaigns.
</p>
</section>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment