Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
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
672bad47
Commit
672bad47
authored
Aug 06, 2020
by
Bitcoin Please
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding `inbox` and `outbox` to system.
parent
c5095c47
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
37 additions
and
16 deletions
+37
-16
src/App.vue
src/App.vue
+9
-3
src/store/modules/profile/getters/getMeta.js
src/store/modules/profile/getters/getMeta.js
+1
-1
src/store/modules/system.js
src/store/modules/system.js
+8
-0
src/store/modules/system/getters/getInbox.js
src/store/modules/system/getters/getInbox.js
+0
-0
src/store/modules/system/getters/getOutbox.js
src/store/modules/system/getters/getOutbox.js
+0
-0
src/store/modules/system/mutations/setAssetSource.js
src/store/modules/system/mutations/setAssetSource.js
+10
-1
src/store/modules/system/mutations/setInbox.js
src/store/modules/system/mutations/setInbox.js
+0
-0
src/store/modules/system/mutations/setOutbox.js
src/store/modules/system/mutations/setOutbox.js
+0
-0
src/store/modules/wallet.js
src/store/modules/wallet.js
+0
-8
src/views/Campaign/Details/History/Supporters.vue
src/views/Campaign/Details/History/Supporters.vue
+9
-3
No files found.
src/App.vue
View file @
672bad47
...
...
@@ -6,9 +6,6 @@
/* Initialize vuex. */
import
{
mapActions
,
mapGetters
}
from
'
vuex
'
/* Import components. */
// import { Notification } from '@/components'
/* Import JQuery. */
// FIXME: Remove ALL jQuery dependencies.
const
$
=
window
.
jQuery
...
...
@@ -53,6 +50,12 @@ export default {
}
},
initCoinManager
()
{
setInterval
(()
=>
{
console
.
log
(
'
COIN MANAGER
'
)
},
5000
)
},
/**
* Test IPFS Connection
*/
...
...
@@ -141,6 +144,9 @@ export default {
/* Initialize application. */
this
.
initApp
()
/* Initialize coin manager. */
// this.initCoinManager()
/* Initialize asset source. */
this
.
updateAssetSource
()
...
...
src/store/modules/profile/getters/getMeta.js
View file @
672bad47
...
...
@@ -55,7 +55,7 @@ const getMeta = async (state, getters, rootState, rootGetters) => {
/* Set target. */
const
target
=
`http://localhost:6767/v1/meta/
${
address
}
`
// const target = `https://api.causes.cash/v1/meta/${
ownerA
ddress}`
// const target = `https://api.causes.cash/v1/meta/${
a
ddress}`
/* Set contract path. */
const
response
=
await
superagent
.
get
(
target
)
...
...
src/store/modules/system.js
View file @
672bad47
...
...
@@ -3,7 +3,9 @@ import getAssetSource from './system/getters/getAssetSource'
import
getEternalDbAddr
from
'
./system/getters/getEternalDbAddr
'
import
getFlags
from
'
./system/getters/getFlags
'
import
getHelp
from
'
./system/getters/getHelp
'
import
getInbox
from
'
./system/getters/getInbox
'
import
getLocale
from
'
./system/getters/getLocale
'
import
getOutbox
from
'
./system/getters/getOutbox
'
/* Import modules (actions). */
import
updateAssetSource
from
'
./system/actions/updateAssetSource
'
...
...
@@ -14,7 +16,9 @@ import updateLocale from './system/actions/updateLocale'
import
setAppStarts
from
'
./system/mutations/setAppStarts
'
import
setAssetSource
from
'
./system/mutations/setAssetSource
'
import
setFlags
from
'
./system/mutations/setFlags
'
import
setInbox
from
'
./system/mutations/setInbox
'
import
setLocale
from
'
./system/mutations/setLocale
'
import
setOutbox
from
'
./system/mutations/setOutbox
'
/* Initialize state. */
const
state
=
{
...
...
@@ -87,7 +91,9 @@ const getters = {
getEternalDbAddr
,
getFlags
,
getHelp
,
getInbox
,
getLocale
,
getOutbox
,
}
/* Actions. */
...
...
@@ -102,7 +108,9 @@ const mutations = {
setAppStarts
,
setAssetSource
,
setFlags
,
setInbox
,
setLocale
,
setOutbox
,
}
/* Export. */
...
...
src/store/modules/
wallet
/getters/getInbox.js
→
src/store/modules/
system
/getters/getInbox.js
View file @
672bad47
File moved
src/store/modules/
wallet
/getters/getOutbox.js
→
src/store/modules/
system
/getters/getOutbox.js
View file @
672bad47
File moved
src/store/modules/system/mutations/setAssetSource.js
View file @
672bad47
...
...
@@ -7,8 +7,17 @@ import msgpack from 'msgpack-lite'
* `_source` is an object, with a key used to describe the asset type.
*/
const
setAssets
=
(
state
,
_source
)
=>
{
/* Initialize assets. */
let
assets
=
null
/* Retrieve current assets. */
const
assets
=
state
.
assets
// const assets = state.assets
try
{
assets
=
msgpack
.
decode
(
Buffer
.
from
(
state
.
assets
,
'
hex
'
))
}
catch
(
err
)
{
console
.
error
(
err
)
assets
=
state
.
assets
}
/* Update (merge) assets. */
const
updated
=
{
...
...
src/store/modules/
wallet
/mutations/setInbox.js
→
src/store/modules/
system
/mutations/setInbox.js
View file @
672bad47
File moved
src/store/modules/
wallet
/mutations/setOutbox.js
→
src/store/modules/
system
/mutations/setOutbox.js
View file @
672bad47
File moved
src/store/modules/wallet.js
View file @
672bad47
...
...
@@ -9,9 +9,7 @@ import getDerivationPath from './wallet/getters/getDerivationPath'
import
getDustAmount
from
'
./wallet/getters/getDustAmount
'
import
getHDNode
from
'
./wallet/getters/getHDNode
'
import
getHistory
from
'
./wallet/getters/getHistory
'
import
getInbox
from
'
./wallet/getters/getInbox
'
import
getMnemonic
from
'
./wallet/getters/getMnemonic
'
import
getOutbox
from
'
./wallet/getters/getMnemonic
'
/* Import modules (actions). */
import
addCoin
from
'
./wallet/actions/addCoin
'
...
...
@@ -25,8 +23,6 @@ import updateOutbox from './wallet/actions/updateOutbox'
import
setAccounts
from
'
./wallet/mutations/setAccounts
'
import
setCoins
from
'
./wallet/mutations/setCoins
'
import
setEmptyWallet
from
'
./wallet/mutations/setEmptyWallet
'
import
setInbox
from
'
./wallet/mutations/setInbox
'
import
setOutbox
from
'
./wallet/mutations/setOutbox
'
/* Initialize state. */
const
state
=
{
...
...
@@ -77,9 +73,7 @@ const getters = {
getDustAmount
,
getHDNode
,
getHistory
,
getInbox
,
getMnemonic
,
getOutbox
,
}
/* Actions. */
...
...
@@ -97,8 +91,6 @@ const mutations = {
setAccounts
,
setCoins
,
setEmptyWallet
,
setInbox
,
setOutbox
,
}
/* Export. */
...
...
src/views/Campaign/Details/History/Supporters.vue
View file @
672bad47
...
...
@@ -40,9 +40,15 @@ export default {
watch
:
{
campaign
:
function
(
_campaign
)
{
/* Handle campaign supporters. */
if
(
_campaign
&&
_campaign
.
assurance
)
{
this
.
pledges
=
_campaign
.
assurance
.
pledges
.
filter
(
pledge
=>
{
return
(
pledge
.
isFilled
===
true
||
pledge
.
isSpent
===
false
)
if
(
_campaign
&&
_campaign
.
assurances
)
{
/* Set pledges. */
const
pledges
=
_campaign
.
assurances
.
pledges
/* Handle all pledges. */
Object
.
keys
(
pledges
).
filter
(
pledgeId
=>
{
if
(
pledges
[
pledgeId
].
isFilled
===
true
||
pledges
[
pledgeId
].
isSpent
===
false
)
{
this
.
pledges
.
push
(
pledges
[
pledgeId
])
}
})
/* Sort pledges (decending). */
...
...
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