diff --git a/src/components/page.ts b/src/components/page.ts index 5e9f262..f8ff30d 100644 --- a/src/components/page.ts +++ b/src/components/page.ts @@ -27,7 +27,11 @@ export const symbol = (name: string) => { target.symbol = name; } } - +export const enableStaking = () => { + return (target: any) => { + target.enableStaking = true; + } +} /** * Abstract Page diff --git a/src/pages/csc.ts b/src/pages/csc.ts index d80b525..e6644da 100644 --- a/src/pages/csc.ts +++ b/src/pages/csc.ts @@ -3,15 +3,13 @@ CSC Network */ -import { xml, useState, reactive, useRef, } from "@odoo/owl"; -import { useContract, useWallet, switchChain } from "@web/core/wallet" -import { OPage } from "@web/components/page"; +import { useState } from "@odoo/owl"; +import { OPage, enableStaking, logo, route, symbol, themplate, title } from "../components/page"; +import { switchChain, useContract, useWallet } from "../core/wallet"; -import cetABI from "@web/data/csc-validators.json" - -import "./csc.xml"; +import cetABI from "../data/csc-validators.json"; import "./csc.scss"; -import { logo, route, symbol, themplate, title } from "../components/page"; +import "./csc.xml"; const genzAdderss = "0xEAfF084e6da9aFE8EcAB4d85de940e7d3153296F"; const testAddress = "0x42eAcf5b37540920914589a6B1b5e45d82D0C1ca"; @@ -26,6 +24,7 @@ const mainnetChainId = "0x34"; @logo('./img/csc.svg') @themplate('pages.csc') @symbol('CET') +@enableStaking() export class CscStakingPage extends OPage { wallet = useWallet(); diff --git a/src/pages/dashboard.xml b/src/pages/dashboard.xml index d774ec4..a6a0263 100644 --- a/src/pages/dashboard.xml +++ b/src/pages/dashboard.xml @@ -11,7 +11,7 @@
-
+
diff --git a/src/pages/fantom.ts b/src/pages/fantom.ts index 7c9dc1c..15888d7 100644 --- a/src/pages/fantom.ts +++ b/src/pages/fantom.ts @@ -28,7 +28,7 @@ import { useContract, useWallet, switchChain } from "@web/core/wallet"; import FantomABI from "@web/data/fantom.json" import "./fantom.xml"; import "./fantom.scss"; -import { route, OPage, title, logo, themplate, symbol } from "../components/page"; +import { route, OPage, title, logo, themplate, symbol, enableStaking } from "../components/page"; const genzAdderss = "0x5a1b57f87b59e093d332c945c66b602843099f97"; @@ -44,6 +44,7 @@ const mainnetChainId = "0xfa"; @logo('./img/fantom.svg') @themplate('pages.fantom') @symbol('FAT') +@enableStaking() export class FantomStaking extends OPage { wallet = useWallet(); diff --git a/src/pages/polygon.ts b/src/pages/polygon.ts index 053f944..d4a2eaf 100644 --- a/src/pages/polygon.ts +++ b/src/pages/polygon.ts @@ -1,6 +1,6 @@ import { useState } from "@odoo/owl"; import { switchChain, useContract, useWallet } from "../core/wallet"; -import { OPage, logo, route, symbol, themplate, title } from "../components/page"; +import { OPage, enableStaking, logo, route, symbol, themplate, title } from "../components/page"; import MaticABI from "../data/polygon-matic.json"; @@ -21,6 +21,7 @@ const mainnetChainId = "0x89"; @logo('./img/matic.jpg') @themplate('pages.polygon') @symbol('MATIC') +@enableStaking() export class MaticStaking extends OPage { wallet = useWallet(); diff --git a/src/pages/sGTON.ts b/src/pages/sGTON.ts index 159ef8a..e96009d 100644 --- a/src/pages/sGTON.ts +++ b/src/pages/sGTON.ts @@ -1,6 +1,6 @@ import { Component, xml, useState, reactive, useRef, } from "@odoo/owl"; import { useContract, useWallet, switchChain } from "@web/core/wallet"; -import { route, OPage, title, logo, themplate } from "../components/page"; +import { route, OPage, title, logo, themplate, enableStaking } from "../components/page"; import sGTONABI from "@web/data/sGTON.json" @@ -20,6 +20,7 @@ const mainnetChainId = "0x1"; @title('sGTON (sGTON)') @logo('./img/sGTON.jpeg') @themplate('pages.sGTON') +@enableStaking() export class sGTONStaking extends OPage { wallet = useWallet();