Skip to content

Swap widget setup #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
20 changes: 20 additions & 0 deletions .github/workflows/pr_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: PR Checks

on:
pull_request:
branches: [main]

jobs:
build:
name: build check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
name: Setup Node.js
with:
node-version: "18.x"
- name: Setup yarn
run: npm install -g yarn
- run: yarn install --immutable
- run: yarn build
20 changes: 20 additions & 0 deletions .github/workflows/publish_to_npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
on:
push:
branches: [saleh/swap-widget-setup]
release:
types: [published]
name: Publish to NPM
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18"
registry-url: https://registry.npmjs.org
- run: yarn install --immutable
- run: yarn build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
46 changes: 46 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.env
# testing
/coverage

# production
/build

/dist
/public/scripts/charting_library
/public/scripts/datafeeds
/src/setupProxy.js
# misc
.vscode
.idea
.DS_Store
.idea
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

**/.terraform/*
**/.terragrunt*/*

# .tfstate files
*.tfstate
*.tfstate.*

*.terraform.lock.hcl


# Sentry Config File
.env.sentry-build-plugin

# Sentry Config File
.env.sentry-build-plugin
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Ignore artifacts:
build
dist
public
src/assets/*
src/gitmodules/TradingView/
node_modules
7 changes: 7 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
"tabWidth": 4,
"useTabs": true,
"jsxBracketSameLine": true,
"printWidth": 90,
"endOfLine":"auto"
}
10 changes: 10 additions & 0 deletions declaration.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
declare module "*.svg" {
import * as React from "react";

export const ReactComponent: React.FunctionComponent<
React.SVGProps<SVGSVGElement> & { title?: string }
>;

const src: string;
export default src;
}
56 changes: 56 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"name": "bluefin-ui-widgets",
"version": "1.0.0",
"description": "This package will contains all the UI widget which will be provide by bluefin for user to plug and play in there custom applications.",
"main": "src/index.tsx",
"dependencies": {
"@bluefin-exchange/aggregator-sdk": "^1.0.18",
"@bluefin-exchange/bluefin-v2-client": "^5.2.37",
"@bluefin-exchange/starship-v2": "^1.1.11",
"@cetusprotocol/cetus-sui-clmm-sdk": "^4.3.1",
"@firefly-exchange/library": "^1.2.22",
"@suiet/wallet-kit": "^0.2.24",
"clsx": "^2.1.1",
"lodash": "^4.17.21",
"loose-envify": "^1.4.0",
"millify": "^6.1.0",
"moment": "^2.30.1",
"react": "^18.3.1",
"react-hot-toast": "^2.4.1",
"react-i18next": "^14.1.1",
"react-loading-skeleton": "^3.4.0",
"sass": "^1.75.0"
},
"devDependencies": {
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-url": "^8.0.2",
"@svgr/rollup": "^8.1.0",
"@types/css-modules": "^1.0.5",
"@types/lodash": "^4.17.0",
"@types/node": "^20.12.8",
"@types/react": "^18.3.1",
"css-loader": "^7.1.1",
"node-polyfill-webpack-plugin": "^3.0.0",
"node-sass": "^9.0.0",
"rollup-plugin-scss": "^4.0.0",
"rollup-plugin-svg": "^2.0.0",
"sass-loader": "^14.2.1",
"style-loader": "^4.0.0",
"ts-loader": "^9.5.1",
"typescript": "^5.4.5",
"url-loader": "^4.1.1",
"webpack": "^5.91.0",
"webpack-cli": "^5.1.4",
"webpack-node-externals": "^3.0.0"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc"
},
"author": "saleh hayat",
"license": "ISC",
"files": [
"dist"
]
}
8 changes: 8 additions & 0 deletions src/assets/icons/1ct.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/assets/icons/add.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/assets/icons/apt.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/icons/arb.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/assets/icons/arbitrum.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/assets/icons/arrows-horizontal.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/assets/icons/arrows-vertical.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/icons/avax.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/icons/bnb.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/icons/bobabeam.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/icons/bridge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/assets/icons/btc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading