Skip to content

Commit

Permalink
Merge pull request #877 from PrimeDAO/staging-mainnet
Browse files Browse the repository at this point in the history
merge for v2.0.1
  • Loading branch information
hiaux0 authored Nov 25, 2022
2 parents cc2c7a0 + b1cbe00 commit 24be96f
Show file tree
Hide file tree
Showing 19 changed files with 66 additions and 40 deletions.
6 changes: 3 additions & 3 deletions cypress/fixtures/25-celo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "1.0.0",
"general": {
"projectName": "25 - Celo",
"projectName": "25 - Celo - Test",
"customLinks": [],
"projectWebsite": "https://www.prime.xyz/",
"whitepaper": "https://launch.prime.xyz/",
Expand Down Expand Up @@ -45,8 +45,8 @@
"id": "celo-dollar",
"price": 0.988245
},
"startDate": "2022-11-18T13:06:00.000Z",
"endDate": "2022-11-21T00:00:00.000Z",
"startDate": "2022-11-25T12:48:00.000Z",
"endDate": "2022-11-26T00:00:00.000Z",
"adminAddress": "0xB86fa0cfEEA21558DF988AD0ae22F92a8EF69AC1",
"legalDisclaimer": "",
"geoBlock": false,
Expand Down
4 changes: 2 additions & 2 deletions src/admin/lbps/dashboard/dashboard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
.featureDescription {
display: flex;
align-self: center;
color: #98979b;
color: $Neutral02;
font-size: 16px;
margin-bottom: 16px;
}
Expand All @@ -72,7 +72,7 @@
flex-direction: column;
row-gap: 6px;
margin-bottom: 16px;
color: #98979b;
color: $Neutral02;
font-size: 16px;

.amount {
Expand Down
4 changes: 2 additions & 2 deletions src/home/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
<div class="launch-section ${activeLaunchState.id === value.id ? 'launch-active' : ''}" click.delegate="loading ? null : setActiveLaunchState(value)">${value.title}</div>
</div>
</div>
<div class="row-launch-section">
<!-- <div class="row-launch-section">
<div class="faq-description-sections">What’s this</div>
<div class="question">?</div>
</div>
</div> -->
</div>
<div class="launch-line"></div>
<featuredlaunches launches-data.bind="launches" launch-type.bind="activeLaunchState.title" loading.bind="loading" show-all></featuredlaunches>
Expand Down
2 changes: 1 addition & 1 deletion src/home/home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
.question {
border-radius: 50%;
text-align: center;
background-color: #98979b;
background-color: $Neutral02;
cursor: default;
width: 20px;
height: 20px;
Expand Down
4 changes: 2 additions & 2 deletions src/launches/launches.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
<div class="fundingToken cell body hot"><img src.to-view="launch.fundingTokenInfo.logoURI"></img>${launch.fundingTokenInfo.symbol}</div>
<div class="type cell body hot">${launch.launchType.toUpperCase()}</div>
<div class="starts cell body hot">
<time-left launch.to-view="launch" hide-icons largest></time-left>
<time-left launch.to-view="launch" hide-icons largest contained></time-left>
</div>
<div class="whitelist cell body hot">
<span if.to-view="launch.whitelisted" class="fa fa-check"></span>
<span else>N/A</span>
<span else></span>
</div>
</a>
</template>
Expand Down
34 changes: 24 additions & 10 deletions src/newLaunch/baseStage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@
}

.content-classes {
border-top: 1px solid #a258a7;
display: grid;
grid-template-columns: 1fr 1.7fr;
margin-left: 100px;
padding-top: 32px;
grid-template-columns: 1.5fr 2fr;
margin-top: 32px;
}

//#footer-date-content {
Expand Down Expand Up @@ -231,6 +229,23 @@
border-radius: 16px;
padding: 24px;
min-width: 640px;

.content-block {
.form-content {

.numeric-input-style {
background-color: $BG04;
}

permissoned {
.toggle-description {
color: $Neutral03;
margin: 10px 0;
}

}
}
}

a {
font-family: Aeonik;
Expand Down Expand Up @@ -348,11 +363,10 @@
}

.content-classes .infoContainer {
padding: 0 0 0 24px;
padding: 0;
}

.page.stageContainer, .content-classes {
margin-bottom: 130px;
&.stage1 {
.infoContainer {
.infoInput {
Expand Down Expand Up @@ -445,7 +459,7 @@
}

.csvUploadPara {
color: $Neutral02;
color: $Neutral03;
margin: 10px 0;
}

Expand Down Expand Up @@ -748,7 +762,7 @@
flex-flow: column;

.fundingDescrp {
color: $Neutral02;
color: $Neutral03;
max-width: 75%;
margin: 0 0 15px 0;
}
Expand Down Expand Up @@ -829,7 +843,7 @@
display: flex;
justify-content: center;
align-items: center;
background-color: $BG01;
background-color: $BG04;
border: 1px solid $Border01;
border-left: 0px;
border-top-right-radius: 10px;
Expand All @@ -845,8 +859,8 @@
.seedTipping {
width: 104px;
margin-bottom: 80px;

input {
background-color: $BG04;
width: 57px;
}
> div {
Expand Down
6 changes: 3 additions & 3 deletions src/newLaunch/permissoned.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<template bindable="checked, toggle, disabled">
<template bindable="checked, toggle, disabled, showDescription">
<div class="infoInput">
<div class="labeledQuestion">
<label for="permissionedToggle">Set Permissioned SEED</label>
<div class="questionMark">
<question-mark allow-html
text="TODO">
text="A Permissioned Seed is a seed with an allowlist and only provided addresses can contribute to it. A Permissionless Seed does not require an allowlist and anybody can contribute to it.">
</question-mark>
</div>
</div>
<p class="toggle-description">SEED is permissioned..</p>
<p if.bind="showDescription !== 'false'" class="toggle-description">Please toggle if you are planning to use an allowlist.</p>

<div class="checkboxContainer ${!checked ? 'isInactive' : ''}"
click.delegate="toggle()">
Expand Down
4 changes: 2 additions & 2 deletions src/newLaunch/seed/stages/stage4.html
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
<div class="content-classes stage4">
<div>
<div class="classes-description">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
<!-- Keeping this div to have css styling work -->
</div>
</div>
<div>
Expand Down Expand Up @@ -302,7 +302,7 @@
<div class="labeledQuestion">
<label for="vestingPeriod">Tipping (Optional)</label>
<div class="questionMark">
<question-mark text="TODO"></question-mark>
<question-mark text="Please decide how much you would like to tip PrimeDAO for Launch services. The tipping amount will be calculated as a percentage of the total number of Project Tokens needed to fund the Seed."></question-mark>
</div>
</div>

Expand Down
5 changes: 5 additions & 0 deletions src/newLaunch/seed/stages/stage4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ export class Stage4 extends BaseStage<ISeedConfig> {
message = "Please enter a number greater than zero for the Funding Tokens Maximum";
} else if (!this.launchConfig.launchDetails.individualCap || this.launchConfig.launchDetails.individualCap === "0") {
message = "Please enter a number greater than zero for the Funding Token Contribution Limit";
} else if (
this.numberService.fromString(this.launchConfig.launchDetails.individualCap) >
this.numberService.fromString(this.launchConfig.launchDetails.fundingMax))
{
message = "Funding Token Contribution Limit should be equal or lower than Funding Tokens Maximum.";
} else if (this.launchConfig.tokenDetails.projectTokenInfo.address === this.launchConfig.launchDetails.fundingTokenInfo.address) {
message = "Funding Token and Project Token cannot be the same. Please reenter one or the other.";
} else if (BigNumber.from(this.launchConfig.launchDetails.fundingTarget).gt(this.launchConfig.launchDetails.fundingMax)) {
Expand Down
1 change: 1 addition & 0 deletions src/newLaunch/seed/stages/stage6.html
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@
checked.bind="launchConfig.launchDetails.isPermissoned"
disabled.bind="true"
toggle.call="toggle()"
show-description="false"
>
</permissoned>
</div>
Expand Down
2 changes: 0 additions & 2 deletions src/newLaunch/stages/stage3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ export class Stage3 extends BaseStage<ILaunchConfig> {
if (!this.wizardState.stage3State) {
this.wizardState.stage3State = {} as any;
}
}

attached(): void {
this.projectTokenAddressText = `The ${capitalizeNetworkName()} address of the token you are offering to contributors`;
}

Expand Down
2 changes: 1 addition & 1 deletion src/resources/dialogs/addClass/addClass.scss
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ body > ux-dialog-container.addClass {
height: 16px;
border-radius: 50%;
text-align: center;
background-color: #98979b;
background-color: $Neutral02;
cursor: default;
> div{
display: flex;
Expand Down
4 changes: 2 additions & 2 deletions src/resources/dialogs/addClass/addClass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ export class AddClassModal {
message = "Please enter a value for Class Purchase limit that is lower or equal to the Funding Tokens Maximum value";
} else if (!this.class.individualCap) {
message = "Please enter a value for project token purchase limit";
} else if (this.class.individualCap.gt(hardCap)) { /* ⚠️ IndividualCap ≤ HardCAP */
message = "Please enter a value for Project token Purchase limit that is lower or equal to the Funding Tokens Maximum";
} else if (this.class.individualCap.gt(this.class.classCap)) { /* ⚠️ IndividualCap ≤ ClassCAP */
message = "Please enter a value for Project token Purchase limit that is lower or equal to the Class Purchase limit value";
} else if (this.class.individualCap.gt(hardCap)) { /* ⚠️ IndividualCap ≤ HardCAP */
message = "Please enter a value for Project token Purchase limit that is lower or equal to the Funding Tokens Maximum";
} else if (this.class.classVestingDuration === null || this.class.classVestingDuration === undefined) {
message = "Please enter a value for \"Project tokens vested for\" ";
} else if (this.class.classVestingCliff === null || this.class.classVestingCliff === undefined) {
Expand Down
4 changes: 2 additions & 2 deletions src/resources/elements/sparkChart/spark-chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ export class SparkChart {
vertLine: {
visible: true,
width: 1,
color: "#98979b", // $Neutral02
color: "#9398A8", // $Neutral02
style: 0,
},
horzLine: {
visible: true,
width: 1,
color: "#98979b", // $Neutral02
color: "#9398A8", // $Neutral02
style: 0,
},
mode: CrosshairMode.Magnet,
Expand Down
2 changes: 1 addition & 1 deletion src/resources/elements/timeLeft/timeLeftSeed.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<span if.to-view="!hideIcons" class="icon far fa-clock"></span>LIVE, ${currentTimeLeft | timespan:"minutes":false:true} left
</div>
<div
if.to-view="launch.claimingIsOpen || launch.isDead"
if.to-view="!launch.incomplete && (launch.claimingIsOpen || launch.isDead)"
class="body complete">
<span if.to-view="!hideIcons" class="icon far fa-clock"></span>Complete
</div>
Expand Down
7 changes: 4 additions & 3 deletions src/seedSale/seedSale.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,10 @@
id="">
</numeric-input>
</div>
<!-- <div class="inputText" show.bind="accountAddress">
~ <formatted-number value.to-view="userUsdBalance" average mantissa="3"></formatted-number> USD
</div> -->
<div class="inputText" show.bind="accountAddress">
&nbsp;
<!-- ~ <formatted-number value.to-view="userUsdBalance" average mantissa="3"></formatted-number> USD -->
</div>
</div>
</div>
<div class="text">
Expand Down
4 changes: 3 additions & 1 deletion src/services/SeedService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ export class SeedService {
this.startingBlockNumber = 5288502;
break;
case Networks.Celo:
this.startingBlockNumber = 14836595;
// this.startingBlockNumber = 14836595; // has 2 celo mainnet test seeds
// this.startingBlockNumber = 16223809; // only has seed with "test" in its name
this.startingBlockNumber = 16341159;
break;
case Networks.Alfajores:
this.startingBlockNumber = 14681726;
Expand Down
9 changes: 7 additions & 2 deletions src/services/TransactionsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { TransactionResponse, TransactionReceipt } from "@ethersproject/provider
import { EventAggregator } from "aurelia-event-aggregator";
import { autoinject } from "aurelia-framework";
import { EthereumService, Hash } from "services/EthereumService";
import { EventConfigException } from "./GeneralEvents";

@autoinject
export default class TransactionsService {
Expand All @@ -28,11 +29,15 @@ export default class TransactionsService {
this.eventAggregator.publish("transaction.confirmed", { message: "Transaction was confirmed", receipt });
return receipt;
} catch (ex) {
let finalEx = ex;
const balancerError = BalancerService.tryParseErrorCode(ex?.error?.message);
if (balancerError) {
ex.error.message = balancerError;
finalEx.error.message = balancerError;
} else if (ex?.data?.message) {
const exMessage = ex.data.message;
finalEx = new EventConfigException(exMessage, ex);
}
this.eventAggregator.publish("transaction.failed", ex);
this.eventAggregator.publish("transaction.failed", finalEx);
return null;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/styles/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $Secondary03: #fff619;
$Secondary04: #ffce3d;
$Secondary05: #64557d;
$Neutral01: #15062d;
$Neutral02: #98979b;
$Neutral02: #9398A8;
$Neutral03: #dcdae5;
$Neutral04: #f9f6f9;
$White: #ffffff;
Expand Down

1 comment on commit 24be96f

@vercel
Copy link

@vercel vercel bot commented on 24be96f Nov 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

prime-launch-dapp – ./

prime-launch-dapp-curvelabs.vercel.app
prime-launch-dapp-git-master-curvelabs.vercel.app
launch.prime.xyz

Please sign in to comment.