Skip to content

Commit

Permalink
Merge branch 'release/0.6.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
mazhutoanton committed Sep 22, 2023
2 parents d032691 + 60c3de4 commit d8ea0b9
Show file tree
Hide file tree
Showing 17 changed files with 699 additions and 694 deletions.
44 changes: 19 additions & 25 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

-

### v0.6.5

- Fix some layout issues

### v0.6.4

- [[Bug]](https://www.notion.so/cere/Score-doesn-t-update-on-Leaderboard-156d4e51984c4c9c9eabca01e7c8955e?pvs=4) Fix
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "0.6.4"
"version": "0.6.5"
}
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/eslint-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cere/eslint-config-games-sdk",
"version": "0.6.4",
"version": "0.6.5",
"main": "index.js",
"private": true,
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cere/games-sdk",
"version": "0.6.4",
"version": "0.6.5",
"description": "Cere Games SDK to integrate games with CERE infrastructure",
"sideEffects": false,
"main": "dist/bundle.umd.js",
Expand All @@ -26,7 +26,7 @@
},
"dependencies": {
"@cere/embed-wallet": "0.12.0",
"@cere/games-sdk-ui": "0.6.4",
"@cere/games-sdk-ui": "0.6.5",
"react-gtm-module": "^2.0.11"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/sdk/src/GameSdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ export class GamesSDK {
}
} else {
modal.close();
this.analytics.trackEvent(ANALYTICS_EVENTS.signUp);
await this.connectWallet({ onComplete, onConnect });
}
},
Expand Down
5 changes: 3 additions & 2 deletions packages/sdk/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export const SDK_VERSION = pkg.version;
/**
* Game session price in $CERE tokens
*/
export const GAME_SESSION_PRICE = 2;
export const NEW_WALLET_REWARD = 5;
export const GAME_SESSION_PRICE = 1;
export const NEW_WALLET_REWARD = 10;

export const GMT_ID = 'GTM-MSJX7Q6';
export const ANALYTICS_EVENTS = {
Expand All @@ -31,6 +31,7 @@ export const ANALYTICS_EVENTS = {
startGame: 'CLICK_START_GAME',
claimTokens: 'CLAIM_TOKENS_BTN',
confirmTransaction: 'CONFIRM_TRANSACTION_BTN',
signUp: 'SIGNUP_LEADERBOARD',
};

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cere/games-sdk-ui",
"version": "0.6.4",
"version": "0.6.5",
"description": "Cere Games SDK UI Elements",
"sideEffects": false,
"main": "dist/bundle.umd.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/widgets/Leaderboard/Leaderboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const Address = styled.div({
});

const SignUpButton = styled.button({
width: 141,
width: 'auto',
height: 52,
borderRadius: 4,
border: '1px solid #F32758',
Expand Down Expand Up @@ -139,7 +139,7 @@ Be top-3 player and share a prize"
)}
{!playerData && (
<Stack align="center">
<SignUpButton onClick={handlePlayAgain}>Sign Up Now!</SignUpButton>
<SignUpButton onClick={handlePlayAgain}>Sign up & reveal your rank</SignUpButton>
</Stack>
)}
<Table data={data} activeAddress={address} hasTournament={Boolean(activeTournament)} />
Expand Down
28 changes: 12 additions & 16 deletions packages/ui/src/widgets/Leaderboard/TopWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,14 @@ const DaysLeft = styled.div(({ tournament }: { tournament?: boolean }) => ({
borderRadius: 8,
fontWeight: 600,
fontSize: 14,
display: 'none',
textAlign: 'center',
position: 'absolute',
left: '-30px',
top: '-80px',
minWidth: 168,
textTransform: 'uppercase',
...(tournament
? {
padding: '7px 15px',
position: 'relative',
top: '0',
left: '0',
display: 'block',
width: '151px',
margin: '4px auto 14px auto',
}
Expand Down Expand Up @@ -124,17 +120,20 @@ const TweetButton = styled(Button)(({ tournament }: { tournament?: boolean }) =>
}));

const GamePortalButton = styled(Typography)(({ tournament }: { tournament?: boolean }) => ({
cursor: 'pointer',
width: 'fit-content',
cursor: 'pointer', // TODO remove via ternary
width: 'auto',
textAlign: 'center',
marginTop: '11px',
color: 'rgba(255, 255, 255, 0.6)',
fontSize: '12px',
lineHeight: '15px',
fontWeight: 400,
textDecoration: 'underline',
...(tournament && {
margin: '12px auto 0 auto',
}),
'@media (max-width: 400px)': {
marginTop: 9,
},
}));

const NFTImage = styled.img({
Expand Down Expand Up @@ -237,26 +236,23 @@ export const TopWidget = ({
<RewardColumn>
<span>1st prize</span>
<img src={`${cdnUrl}/assets/first-place-reward.svg`} alt="First place reward" />
<span>USDT</span>
</RewardColumn>
<RewardColumn>
<span>2nd prize</span>
<img src={`${cdnUrl}/assets/second-place-reward.svg`} alt="Second place reward" />
<span>USDT</span>
</RewardColumn>
<RewardColumn>
<span>3rd prize</span>
<img src={`${cdnUrl}/assets/third-place-reward.svg`} alt="Third place reward" />
<span>USDT</span>
</RewardColumn>
</RewardsRow>
{rank && (
{address && (
<Typography align="center">
Your rank <Rank>{rank}</Rank>
</Typography>
)}
{address && (
<Row columns={'130px 130px'} columnGap={6} justify="center">
<Row columns={'auto 130px'} columnGap={6} justify="center">
<PlayAgain onClick={onPlayAgain} tournament={hasActiveTournament}>
<div style={{ display: 'flex', alignItems: 'center' }}>
<RepeatIcon />
Expand All @@ -274,8 +270,8 @@ export const TopWidget = ({
</TweetButton>
</Row>
)}
<GamePortalButton tournament={hasActiveTournament} onClick={handleOpenGamePortal}>
Go to Cere game portal →
<GamePortalButton tournament={hasActiveTournament} onClick={address ? handleOpenGamePortal : () => null}>
{address ? 'Go to Cere game portal →' : 'Was your score good enough to win? Sign up to see'}
</GamePortalButton>
</>
</Content>
Expand Down
4 changes: 2 additions & 2 deletions playground/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@cere-games-sdk/playground",
"version": "0.6.4",
"version": "0.6.5",
"private": true,
"scripts": {
"start": "craco start"
},
"dependencies": {
"@cere/games-sdk": "0.6.4",
"@cere/games-sdk": "0.6.5",
"@emotion/react": "^11.10.5",
"@emotion/styled": "^11.10.5",
"@mui/lab": "^5.0.0-alpha.119",
Expand Down
2 changes: 1 addition & 1 deletion tests/wdio/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cere-games-sdk/wdio",
"version": "0.6.4",
"version": "0.6.5",
"private": true,
"scripts": {
"start": "wdio run ./wdio.conf.ts",
Expand Down
4 changes: 2 additions & 2 deletions web/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@cere-games-sdk/web",
"version": "0.6.4",
"version": "0.6.5",
"private": true,
"scripts": {
"start": "webpack serve --open /examples",
"bundle": "webpack"
},
"dependencies": {
"@cere/games-sdk": "0.6.4"
"@cere/games-sdk": "0.6.5"
},
"devDependencies": {
"copy-webpack-plugin": "^11.0.0",
Expand Down
Loading

0 comments on commit d8ea0b9

Please sign in to comment.