From b923c618c3e827d449e7282909fb1460fc3cf013 Mon Sep 17 00:00:00 2001 From: Micha Vie Date: Fri, 1 Mar 2024 15:43:49 +0100 Subject: [PATCH] add lunarpay extension setup --- README.md | 1 + .../images/extensions/lunarpay-logo.svg | 15 +++++++++++ src/config.ts | 8 +++--- src/extensions/lunarpay/register.ts | 22 ++++++++++++++++ src/extensions/lunarpay/src/App.tsx | 25 +++++++++++++++++++ src/extensions/lunarpay/src/config.ts | 1 + src/extensions/lunarpay/src/contracts.tsx | 14 +++++++++++ .../lunarpay/src/payroll/PayrollTab.tsx | 11 ++++++++ .../src/subscription/SubscriptionTab.tsx | 11 ++++++++ 9 files changed, 105 insertions(+), 3 deletions(-) create mode 100644 dev/public/images/extensions/lunarpay-logo.svg create mode 100644 src/extensions/lunarpay/register.ts create mode 100644 src/extensions/lunarpay/src/App.tsx create mode 100644 src/extensions/lunarpay/src/config.ts create mode 100644 src/extensions/lunarpay/src/contracts.tsx create mode 100644 src/extensions/lunarpay/src/payroll/PayrollTab.tsx create mode 100644 src/extensions/lunarpay/src/subscription/SubscriptionTab.tsx diff --git a/README.md b/README.md index 7aaa9e8..f4538f9 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Extensions (Apps & Widgets) for the DAOs on [peerme.io](https://peerme.io). For - xBulk: [xbulk.app](https://xbulk.app) - AshSwap: [ashswap.io](https://ashswap.io) (in progress) - ArtCPAClub [artcpaclub.com](https://marketplace.artcpaclub.com) +- LunarPay [lunarpay.finance](https://lunarpay.finance) (in progress) ## Create your App diff --git a/dev/public/images/extensions/lunarpay-logo.svg b/dev/public/images/extensions/lunarpay-logo.svg new file mode 100644 index 0000000..b5033cd --- /dev/null +++ b/dev/public/images/extensions/lunarpay-logo.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/config.ts b/src/config.ts index b9a36b8..0e38bba 100644 --- a/src/config.ts +++ b/src/config.ts @@ -4,12 +4,13 @@ import { XBulkExtension } from './extensions/xbulk/register' import { HatomExtension } from './extensions/hatom/register' import { ItheumExtension } from './extensions/itheum/register' import { StakingExtension } from './extensions/staking/register' +import { AshSwapExtension } from './extensions/ashswap/register' import { CoindripExtension } from './extensions/coindrip/register' +import { LunarPayExtension } from './extensions/lunarpay/register' +import { Sense4fitExtension } from './extensions/sense4fit/register' import { XExchangeExtension } from './extensions/xexchange/register' -import { PulsarMoneyExtension } from './extensions/pulsarmoney/register' -import { AshSwapExtension } from './extensions/ashswap/register' import { ArtCpaClubExtension } from './extensions/artcpaclub/register' -import { Sense4fitExtension } from './extensions/sense4fit/register' +import { PulsarMoneyExtension } from './extensions/pulsarmoney/register' export const Config = (config: ExtensionConfig) => ({ Extensions: [ @@ -25,6 +26,7 @@ export const Config = (config: ExtensionConfig) => ({ AshSwapExtension(config), Sense4fitExtension(config), ArtCpaClubExtension(config), + LunarPayExtension(config), ], KnowledgeBase: { diff --git a/src/extensions/lunarpay/register.ts b/src/extensions/lunarpay/register.ts new file mode 100644 index 0000000..c46ba43 --- /dev/null +++ b/src/extensions/lunarpay/register.ts @@ -0,0 +1,22 @@ +import { App } from './src/App' +import { Contracts } from './src/contracts' +import { ExtensionConfig, ExtensionInfo } from '../../shared/types' + +export const LunarPayExtension = (config: ExtensionConfig): ExtensionInfo => ({ + Enabled: false, + Name: 'LunarPay', + Description: 'Payments made simple for WEB3 businesses.', + Website: 'https://lunarpay.finance', + Logo: { + Light: '/images/extensions/lunarpay-logo.svg', + Dark: '/images/extensions/lunarpay-logo.svg', + }, + Tags: ['defi'], + Contracts: Contracts(config), + AppRoot: App, + WidgetRoots: {}, + Developer: { + Name: 'LunarPay', + Website: 'https://lunarpay.finance', + }, +}) diff --git a/src/extensions/lunarpay/src/App.tsx b/src/extensions/lunarpay/src/App.tsx new file mode 100644 index 0000000..129c40f --- /dev/null +++ b/src/extensions/lunarpay/src/App.tsx @@ -0,0 +1,25 @@ +import React from 'react' +import { Tab } from '@headlessui/react' +import { PayrollTab } from './payroll/PayrollTab' +import { TabButton } from '../../../shared/ui/elements' +import { faCoins } from '@fortawesome/free-solid-svg-icons' +import { SubscriptionTab } from './subscription/SubscriptionTab' + +export const App = () => { + return ( + + + Payroll + Subscriptions + + + + + + + + + + + ) +} diff --git a/src/extensions/lunarpay/src/config.ts b/src/extensions/lunarpay/src/config.ts new file mode 100644 index 0000000..6c5fc9e --- /dev/null +++ b/src/extensions/lunarpay/src/config.ts @@ -0,0 +1 @@ +export const Config = {} diff --git a/src/extensions/lunarpay/src/contracts.tsx b/src/extensions/lunarpay/src/contracts.tsx new file mode 100644 index 0000000..feda24b --- /dev/null +++ b/src/extensions/lunarpay/src/contracts.tsx @@ -0,0 +1,14 @@ +import { Network, ExtensionScInfo, ExtensionConfig } from '../../../shared/types' + +const getContractAddress = (network: Network) => { + if (network === 'devnet') return '#' + if (network === 'testnet') return '#' + return '#' +} + +export const Contracts = (config: ExtensionConfig): ExtensionScInfo => ({ + YourCustomScEndpoint: { + Address: getContractAddress(config.network), + Endpoint: 'yourCustomScEndpoint', + }, +}) diff --git a/src/extensions/lunarpay/src/payroll/PayrollTab.tsx b/src/extensions/lunarpay/src/payroll/PayrollTab.tsx new file mode 100644 index 0000000..0e56b7f --- /dev/null +++ b/src/extensions/lunarpay/src/payroll/PayrollTab.tsx @@ -0,0 +1,11 @@ +import React from 'react' +import { useApp } from '../../../../shared/hooks/useApp' +import { AppSection } from '../../../../shared/ui/elements' + +export function PayrollTab() { + const app = useApp() + + console.log(app) + + return Coming soon. +} diff --git a/src/extensions/lunarpay/src/subscription/SubscriptionTab.tsx b/src/extensions/lunarpay/src/subscription/SubscriptionTab.tsx new file mode 100644 index 0000000..5b823b8 --- /dev/null +++ b/src/extensions/lunarpay/src/subscription/SubscriptionTab.tsx @@ -0,0 +1,11 @@ +import React from 'react' +import { useApp } from '../../../../shared/hooks/useApp' +import { AppSection } from '../../../../shared/ui/elements' + +export function SubscriptionTab() { + const app = useApp() + + console.log(app) + + return Coming soon. +}