Skip to content

Commit

Permalink
remove loadArtifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
catdev2024 authored and opcatbugcloser committed Nov 11, 2024
1 parent 74fc50c commit ac0af11
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
5 changes: 5 additions & 0 deletions packages/catapp/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
14 changes: 0 additions & 14 deletions packages/catapp/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ac0af11

Please sign in to comment.