diff --git a/packages/catapp/src/App.tsx b/packages/catapp/src/App.tsx index 25f5a76f..fae10ef0 100644 --- a/packages/catapp/src/App.tsx +++ b/packages/catapp/src/App.tsx @@ -103,6 +103,11 @@ function App() { const utxos = await walletService.current.getUTXOs(); + if(utxos.length == 0) { + alert("Insufficient satoshis balance!"); + return; + } + const receiver = btc.Address.fromString(data.address); const d = new Decimal(data.amount).mul( Math.pow(10, metadata.info.decimals) diff --git a/packages/catapp/src/index.tsx b/packages/catapp/src/index.tsx index 5b536e3b..032464fb 100644 --- a/packages/catapp/src/index.tsx +++ b/packages/catapp/src/index.tsx @@ -3,20 +3,6 @@ import ReactDOM from 'react-dom/client'; import './index.css'; import App from './App'; import reportWebVitals from './reportWebVitals'; -import { BurnGuard, CAT20, TransferGuard } from '@cat-protocol/cat-smartcontracts'; -import cat20 from '../../smartcontracts/artifacts/contracts/token/cat20.json'; -import burnGuard from '../../smartcontracts/artifacts/contracts/token//burnGuard.json'; -import transferGuard from '../../smartcontracts/artifacts/contracts/token/transferGuard.json'; - -function loadArtifacts() { - try { - CAT20.loadArtifact(cat20) - BurnGuard.loadArtifact(burnGuard) - TransferGuard.loadArtifact(transferGuard) -} catch (error) { /* empty */ } -} - -loadArtifacts(); const root = ReactDOM.createRoot( document.getElementById('root') as HTMLElement