Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

feat: discoin claims #2

Merged
merged 1 commit into from
Sep 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
#LOG_TYPE=combined

# Premium token fee (default: 500000)
#TOSIFEE=500000
#CLAIM_FEE=500000

# Comma-separated list of stake pools which are not charged a premium fee (default: empty)
#TOSIFEE_WHITELIST=pool104v7kzpq86r0wnfsz8r7jeld2raap92qq84trjcqk62zyh9akqt
#CLAIM_FEE_WHITELIST=pool104v7kzpq86r0wnfsz8r7jeld2raap92qq84trjcqk62zyh9akqt

# Access token for the Vending Machine API (required)
#VM_API_TOKEN="CHANGEME"
Expand All @@ -50,4 +50,4 @@
#VM_URL="https://vm.adaseal.eu"

# enable ergo side
#ERGO_ENABLED=false
#ERGO_ENABLED=false
2 changes: 1 addition & 1 deletion .github/workflows/ci-ansible.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Ansible CI

on:
pull_request:
branches: [ master ]
branches: [ main ]
paths: [ 'ansible/**','runme.sh','.github/workflows/ci-ansible.yml' ]

jobs:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Docker CI

on:
pull_request:
branches: [ master ]
branches: [ main ]
paths: [ 'Dockerfile','client/**','public/**','server/**','src/**','*.ts','*.json','.github/workflows/ci-docker.yml' ]

env:
Expand All @@ -29,7 +29,7 @@ jobs:
with:
context: .
push: false
tags: tosidrop:latest
tags: claim:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# TEMP fix
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
with:
context: .
push: false
tags: tosidrop:latest
tags: claim:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# TEMP fix
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: JavaScript CI

on:
pull_request:
branches: [ master ]
branches: [ main ]
paths: [ 'client/**','server/**', 'src/**','*.ts','*.json','.github/workflows/ci-js.yml' ]

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [ "master" ]
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
branches: [ "main" ]
schedule:
- cron: '27 1 * * 5'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ name: publish

on:
push:
branches: ['master']
branches: ['main']
tags: ['v*.*.*']

concurrency: ${{ github.ref }}

env:
REGISTRY: ghcr.io
IMAGE_NAME: tosidrop/vm-frontend
IMAGE_NAME: ${{ github.repository }}

jobs:
build-amd64:
Expand Down
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
MIT License

Copyright (c) 2022 TosiDrop
Copyright (c) 2023 Blink Labs, LLC.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# vm-frontend

Welcome to the Tosidrop VM Frontend!
Welcome to the Silk Toad VM Frontend!

## About
The code is split into two projects, an Express API which serves as a backend
Expand Down
2 changes: 1 addition & 1 deletion ansible/local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
process_config:
enabled: "false" # string, per docs
tags:
- product:tosidrop
- product:claims

- name: nodePlaybook | include vm_frontend role
include_role:
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/vm_frontend/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
redis_enabled: false
vm_frontend_version: 'master'
vm_frontend_image: 'ghcr.io/tosidrop/vm-frontend:{{ vm_frontend_version }}'
vm_frontend_version: 'main'
vm_frontend_image: 'ghcr.io/blinklabs-io/discoin-vm-frontend:{{ vm_frontend_version }}'
vm_frontend_port: 3000
6 changes: 3 additions & 3 deletions client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ No testing as of now, might be introduced in the future.

## CSS

We use tailwind for CSS. Please no CSS files unless necessary. Please refer to [the official documentation](https://tailwindcss.com/). If you are developing TosiDrop client, PLEASE follow the guidelines here.
We use tailwind for CSS. Please no CSS files unless necessary. Please refer to [the official documentation](https://tailwindcss.com/). If you are developing a VM client, PLEASE follow the guidelines here.

### Big component, e.g., modal, wallet, and main content
- `rounded-2xl`
Expand All @@ -62,7 +62,7 @@ We use tailwind for CSS. Please no CSS files unless necessary. Please refer to [
- `m-2.5`
- `py-2.5`
- `px-5`
- `tosi-button`
- `claim-button`

### Title
- `text-3xl`
Expand All @@ -73,4 +73,4 @@ We use tailwind for CSS. Please no CSS files unless necessary. Please refer to [
### Color for text
- `text-green-600`: success
- `text-red-600`: failure
- `text-yellow-400`: warning
- `text-yellow-400`: warning
4 changes: 2 additions & 2 deletions client/package-lock.json

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

4 changes: 2 additions & 2 deletions client/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tosidrop-client",
"name": "vm-client",
"version": "1.0.0",
"description": "TosiDrop Frontend React App",
"description": "VM Frontend React App",
"engines": {
"node": ">=18",
"npm": ">=9"
Expand Down
Binary file modified client/public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion client/public/browserconfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#c7d5f4</TileColor>
<TileColor>#4285f4</TileColor>
</tile>
</msapplication>
</browserconfig>
Binary file modified client/public/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified client/public/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified client/public/favicon.ico
Binary file not shown.
25 changes: 10 additions & 15 deletions client/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
sizes="16x16"
href="%PUBLIC_URL%/favicon-16x16.png"
/>
<link
rel="mask-icon"
href="%PUBLIC_URL%/safari-pinned-tab.svg"
color="#97aee2"
/>
<link
rel="apple-touch-icon"
sizes="180x180"
Expand All @@ -33,25 +28,25 @@
rel="stylesheet"
/>

<meta name="apple-mobile-web-app-title" content="TosiDrop" />
<meta name="application-name" content="TosiDrop" />
<meta name="msapplication-TileColor" content="#c7d5f4" />
<meta name="theme-color" content="#c7d5f4" />
<meta name="apple-mobile-web-app-title" content="The Silk Toad Claims" />
<meta name="application-name" content="The Silk Toad Claims" />
<meta name="msapplication-TileColor" content="#121212" />
<meta name="theme-color" content="#121212" />
<meta
name="description"
content="TosiDrop is an all-encompassing token distribution platform on the Cardano and Ergo blockchains."
content="Cardano native token claims portal for The Silk Toad"
/>
<meta
property="og:image"
content="%PUBLIC_URL%/tosidrop-logo-512x512.png"
content="%PUBLIC_URL%/logo-512x512.png"
/>
<meta property="og:image:type" content="image/png" />
<meta property="og:image:width" content="512" />
<meta property="og:image:height" content="512" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://tosidrop.io/" />
<meta property="og:title" content="TosiDrop" />
<meta property="og:description" content="Airdrops on Cardano and Ergo" />
<meta property="og:url" content="https://claim.silktoad.io/" />
<meta property="og:title" content="The Silk Toad Claims" />
<meta property="og:description" content="Cardano native token claims portal for The Silk Toad" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
Expand All @@ -66,7 +61,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>TosiDrop - Airdrops on Cardano and Ergo</title>
<title>The Silk Toad Claims</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
Binary file added client/public/logo-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/public/logo-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions client/public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"name": "TosiDrop",
"short_name": "TosiDrop",
"name": "The Silk Toad Claims",
"short_name": "The Silk Toad Claims",
"icons": [
{
"src": "/tosidrop-logo-192x192.png",
"src": "logo-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/tosidrop-logo-512x512.png",
"src": "logo-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#c7d5f4",
"background_color": "#c7d5f4",
"start_url": "https://tosidrop.io",
"theme_color": "#121212",
"background_color": "#121212",
"start_url": "https://discoin.blinklabs.io",
"display": "standalone"
}
Binary file modified client/public/mstile-150x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 0 additions & 31 deletions client/public/safari-pinned-tab.svg

This file was deleted.

Binary file removed client/public/tosidrop-logo-192x192.png
Binary file not shown.
Binary file removed client/public/tosidrop-logo-512x512.png
Binary file not shown.
Binary file added client/src/assets/discoin-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/src/assets/silktoad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions client/src/components/Claim/CheckRewardInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function CheckRewardInput({
></input>
<div className="flex flex-row items-center">
<button
className="tosi-button py-2.5 px-5 rounded-lg flex flex-row items-center"
className="claim-button py-2.5 px-5 rounded-lg flex flex-row items-center"
disabled={!isSearchDisabledAndStakingInfoShown}
onClick={checkRewards}
>
Expand All @@ -52,12 +52,12 @@ export default function CheckRewardInput({
) : null}
</button>
<button
className={`tosi-button py-2.5 px-5 rounded-lg ml-5 ${
className={`claim-button py-2.5 px-5 rounded-lg ml-5 ${
isSearchDisabledAndStakingInfoShown ? " hidden" : ""
}`}
onClick={cancelClaim}
>
<div className="tosi-cancel-text">Cancel</div>
<div className="claim-cancel-text">Cancel</div>
</button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { faStar } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";

export default function TosifeeTooltip() {
export default function ClaimFeeTooltip() {
return (
<span className="premium-token tooltip-activator">
<FontAwesomeIcon
className="text-premium cursor-help premium-pulse"
icon={faStar}
/>
<div className="tooltip w-64 p-3.5 rounded-2xl right-5 bottom-5 absolute">
TosiFee is applied to tokens that use TosiDrop services.
A fee is applied to tokens distributed by this service.
</div>
</span>
);
Expand Down
8 changes: 4 additions & 4 deletions client/src/components/Claim/ClaimableTokenBox/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import TokenInfoTooltip from "../TokenInfoTooltip";
import TosifeeTooltip from "../TosifeeTooltip";
// import TokenInfoTooltip from "../TokenInfoTooltip";
import ClaimFeeTooltip from "../ClaimFeeTooltip";
import "./index.scss";

interface Props {
Expand Down Expand Up @@ -38,8 +38,8 @@ const ClaimableTokenBox = ({
<div className="w-full flex flex-row items-center">
<div className="text-sm">{amount} available</div>
<div className="ml-auto flex flex-row align-center gap-2">
<TokenInfoTooltip price={price} total={total}></TokenInfoTooltip>
{premium ? <TosifeeTooltip></TosifeeTooltip> : null}
{/* No token info <TokenInfoTooltip price={price} total={total}></TokenInfoTooltip> */}
{premium ? <ClaimFeeTooltip></ClaimFeeTooltip> : null}
</div>
</div>
<img alt="logo" src={logo} className="h-24"></img>
Expand Down
10 changes: 5 additions & 5 deletions client/src/components/Claim/RewardsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ export default function RewardsView({
<FontAwesomeIcon icon={faStar} />
</div>
{poolInfo?.isWhitelisted
? "No TosiFee on claims because you have staked to a TosiDrop core pool"
: "These tokens incur a TosiFee when claiming"}
? "No fee on claims because you have staked to a whitelisted pool"
: "These tokens incur a fee when claiming"}
</div>
<div className={"flex flex-row flex-wrap gap-4"}>
{claimableTokens.map((token, index) => {
Expand Down Expand Up @@ -99,21 +99,21 @@ export default function RewardsView({
<div>Selected {numberOfSelectedTokens} token</div>
<div className="ml-auto flex flex-row w-fit gap-4">
<button
className="tosi-button py-2.5 px-5 rounded-lg"
className="claim-button py-2.5 px-5 rounded-lg"
onClick={selectAll}
>
Unselect All
</button>

<button
className="tosi-button py-2.5 px-5 rounded-lg"
className="claim-button py-2.5 px-5 rounded-lg"
onClick={selectRandomTokens}
>
I'm feeling lucky
</button>

<button
className="tosi-button py-2.5 px-5 rounded-lg flex flex-row items-center"
className="claim-button py-2.5 px-5 rounded-lg flex flex-row items-center"
disabled={numberOfSelectedTokens === 0}
onClick={claimRewards}
>
Expand Down
Loading
Loading