Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Frontend
Project
Project
Details
Activity
Releases
Dependency List
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
803
Issues
803
List
Boards
Labels
Service Desk
Milestones
Merge Requests
61
Merge Requests
61
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Commits
67cdf6a1
Commit
67cdf6a1
authored
52 minutes ago
by
Emiliano Balbuena
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(wip): Payments
parent
14e92682
goal/boost-campaigns-e24
1 merge request
!387
WIP: Boost Campaigns (&24)
Pipeline
#69480064
passed with stages
in 29 minutes and 14 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
campaign-payments.service.ts
src/app/modules/boost/campaigns/campaign-payments.service.ts
+1
-1
campaigns.service.ts
src/app/modules/boost/campaigns/campaigns.service.ts
+2
-2
campaigns.type.ts
src/app/modules/boost/campaigns/campaigns.type.ts
+3
-1
creator.component.ts
src/app/modules/boost/campaigns/creator/creator.component.ts
+1
-3
No files found.
src/app/modules/boost/campaigns/campaign-payments.service.ts
View file @
67cdf6a1
...
...
@@ -2,7 +2,7 @@ import { Injectable } from '@angular/core';
import
{
Web3WalletService
}
from
'
../../blockchain/web3-wallet.service
'
;
import
{
OverlayModalService
}
from
'
../../../services/ux/overlay-modal
'
;
import
{
GetMetamaskComponent
}
from
'
../../blockchain/metamask/getmetamask.component
'
;
import
{
Campaign
,
CampaignPayment
}
from
'
./campaigns.type
'
;
import
{
Campaign
,
Campaign
BudgetType
,
Campaign
Payment
}
from
'
./campaigns.type
'
;
import
{
TokenContractService
}
from
'
../../blockchain/contracts/token-contract.service
'
;
@
Injectable
()
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/boost/campaigns/campaigns.service.ts
View file @
67cdf6a1
...
...
@@ -85,7 +85,7 @@ export class CampaignsService {
const
data
=
{
...
campaign
};
if
(
payment
)
{
data
[
'
nonce
'
]
=
payment
;
data
[
'
payment
'
]
=
payment
;
}
return
(
await
this
.
client
.
post
(
`api/v2/boost/campaigns`
,
data
)
as
any
).
campaign
;
...
...
@@ -103,7 +103,7 @@ export class CampaignsService {
const
data
=
{
...
campaign
};
if
(
payment
)
{
data
[
'
nonce
'
]
=
payment
;
data
[
'
payment
'
]
=
payment
;
}
return
(
await
this
.
client
.
post
(
`api/v2/boost/campaigns/
${
campaign
.
urn
}
`
,
data
)
as
any
).
campaign
;
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/boost/campaigns/campaigns.type.ts
View file @
67cdf6a1
export
type
CampaignType
=
'
newsfeed
'
|
'
content
'
|
'
banner
'
|
'
video
'
;
export
type
CampaignBudgetType
=
'
tokens
'
;
export
type
CampaignDeliveryStatus
=
'
pending
'
|
'
created
'
|
'
failed
'
|
'
approved
'
|
'
rejected
'
|
'
revoked
'
|
'
completed
'
;
export
type
Campaign
=
{
...
...
@@ -11,11 +12,12 @@ export type Campaign = {
start
:
number
,
end
:
number
,
budget
:
number
,
budget_type
:
string
,
budget_type
:
CampaignBudgetType
,
// Engine
urn
?:
string
,
checksum
?:
string
,
payments
?:
any
[],
// Client-side
client_guid
?:
string
,
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/boost/campaigns/creator/creator.component.ts
View file @
67cdf6a1
...
...
@@ -83,9 +83,7 @@ export class BoostCampaignsCreatorComponent implements OnInit, OnDestroy {
this
.
detectChanges
();
try
{
const
campaign
=
await
this
.
service
.
get
(
this
.
urn
);
this
.
campaign
=
campaign
;
this
.
campaign
=
await
this
.
service
.
get
(
this
.
urn
);
}
catch
(
e
)
{
console
.
error
(
'
BoostCampaignsCreatorComponent
'
,
e
);
this
.
currentError
=
(
e
&&
e
.
message
)
||
'
Unknown error. Check your browser console.
'
;
...
...
This diff is collapsed.
Click to expand it.
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