Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
See what's new at GitLab
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Causes Cash
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
15
Issues
15
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Metrics
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Bitcoin Please
Causes Cash
Commits
fba0e137
Commit
fba0e137
authored
Aug 12, 2020
by
Bitcoin Please
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added profile details request.
parent
54c17489
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
9 deletions
+63
-9
public/index.html
public/index.html
+0
-3
src/store/modules/profile.js
src/store/modules/profile.js
+2
-0
src/store/modules/profile/getters/getDetails.js
src/store/modules/profile/getters/getDetails.js
+42
-0
src/views/Account/Campaigns.vue
src/views/Account/Campaigns.vue
+16
-4
src/views/Campaign/Details/Content/Payouts.vue
src/views/Campaign/Details/Content/Payouts.vue
+3
-2
No files found.
public/index.html
View file @
fba0e137
...
...
@@ -30,9 +30,6 @@
<meta
name=
"twitter:title"
content=
"Causes Cash"
>
<meta
name=
"twitter:description"
content=
"An uncensorable funding platform for radical creators and unstoppable service providers."
>
<meta
name=
"twitter:image"
content=
"https://causes.cash/poster.jpg?1580211230"
>
<link
rel=
"stylesheet"
href=
"https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900"
>
<link
rel=
"stylesheet"
href=
"https://use.fontawesome.com/releases/v5.8.2/css/all.css"
>
</head>
<body>
...
...
src/store/modules/profile.js
View file @
fba0e137
/* Import modules (getters). */
import
getAvatar
from
'
./profile/getters/getAvatar
'
import
getDetails
from
'
./profile/getters/getDetails
'
import
getEmail
from
'
./profile/getters/getEmail
'
import
getMasterSeed
from
'
./profile/getters/getMasterSeed
'
import
getMeta
from
'
./profile/getters/getMeta
'
...
...
@@ -68,6 +69,7 @@ const state = {
/* Getters. */
const
getters
=
{
getAvatar
,
getDetails
,
getEmail
,
getMasterSeed
,
getMeta
,
...
...
src/store/modules/profile/getters/getDetails.js
0 → 100644
View file @
fba0e137
/* Import modules. */
import
Nito
from
'
nitojs
'
import
superagent
from
'
superagent
'
/**
* Get Details
*/
const
getDetails
=
async
(
state
,
getter
,
rootState
,
rootGetters
)
=>
{
/* Set profile index. */
const
profileIndex
=
0
/* Set chain. */
const
chain
=
0
// receiving account
/* Set derivation path. */
const
path
=
rootGetters
[
'
wallet/getDerivationPath
'
](
chain
,
profileIndex
)
/* Initialize HD node. */
const
hdNode
=
rootGetters
[
'
wallet/getHDNode
'
]
/* Initialize child node. */
const
childNode
=
hdNode
.
deriveChild
(
path
)
/* Set (profile) address. */
const
address
=
Nito
.
Address
.
toCashAddress
(
childNode
)
// console.log('GET DETAILS (address):', address)
/* Retrieve API provider. */
const
API_PROVIDER
=
rootGetters
.
getApiProvider
const
results
=
await
superagent
.
get
(
`
${
API_PROVIDER
}
/profiles/
${
address
}
`
)
// console.log('GET DETAILS (profile):', results)
if
(
results
&&
results
.
body
)
{
return
results
.
body
[
0
]
// FIXME: Should we ONLY send one result??
}
else
{
return
results
}
}
/* Export module. */
export
default
getDetails
src/views/Account/Campaigns.vue
View file @
fba0e137
...
...
@@ -27,11 +27,11 @@
</router-link>
<div
class=
"text-center"
>
<router-link
:to=
"campaign.slug + '-null'"
>
<router-link
:to=
"
'/@' + campaign.owner.slug + '/' +
campaign.slug + '-null'"
>
open live
</router-link>
|
<router-link
:to=
"campaign.slug + '/manage'"
>
<router-link
:to=
"
'/@' + campaign.owner.slug + '/' +
campaign.slug + '/manage'"
>
manage
</router-link>
</div>
...
...
@@ -138,6 +138,7 @@ export default {
]),
...
mapGetters
(
'
profile
'
,
[
'
getDetails
'
,
'
getSignedMessage
'
,
]),
...
...
@@ -207,10 +208,21 @@ export default {
},
created
:
async
function
()
{
/* Set owner slug. */
this
.
ownerSlug
=
this
.
$route
.
params
.
pathMatch
.
toLowerCase
()
// this.ownerSlug = this.$route.params.pathMatch.toLowerCase()
// console.log('OWNER SLUG', this.ownerSlug)
const
details
=
await
this
.
getDetails
console
.
log
(
'
GET DETAILS (campaigns)
'
,
details
)
const
account
=
details
.
account
console
.
log
(
'
ACCOUNT
'
,
account
);
const
address
=
account
.
address
console
.
log
(
'
ADDRESS
'
,
address
);
/* Retrieve campaigns. */
this
.
campaigns
=
await
this
.
getCampaigns
(
this
.
ownerSlug
)
// this.campaigns = await this.getCampaigns(this.ownerSlug)
this
.
campaigns
=
await
this
.
getCampaigns
(
address
)
console
.
log
(
'
ACCOUNT CAMAPAIGNS
'
,
this
.
campaigns
)
},
}
...
...
src/views/Campaign/Details/Content/Payouts.vue
View file @
fba0e137
...
...
@@ -488,10 +488,11 @@ export default {
console
.
log
(
'
oraclePk
'
,
oraclePk
)
/* Initialize minimum valid block. */
const
minValidBlock
=
643123
// const minValidBlock = 643123
const
minValidBlock
=
await
Nito
.
Blockchain
.
getBlockHeight
()
console
.
log
(
'
MIN VALID BLOCK
'
,
minValidBlock
)
/* Initialize monthly pledge amount. */
// const monthlyPledgeAmt = 1337
const
pledgeUSD
=
numeral
(
this
.
pledgeUSD
).
value
()
const
monthlyPledgeAmt
=
Math
.
round
(
pledgeUSD
*
100
)
console
.
log
(
'
MONTHLY PLEDGE AMOUNT
'
,
pledgeUSD
,
monthlyPledgeAmt
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment