diff --git a/electron/main/index.ts b/electron/main/index.ts index 875bd06..73a4cd8 100644 --- a/electron/main/index.ts +++ b/electron/main/index.ts @@ -270,17 +270,14 @@ ipcMain.on('mint_nft', async (event, { responseChannel, ...args }) => { }); function getEncodedId(launcherCoinRecord: any) { - const smartLauncherCoin = new SmartCoin({ - parentCoinInfo: launcherCoinRecord.coin.parent_coin_info, - puzzleHash: launcherCoinRecord.coin.puzzle_hash, + const launcherCoin = new SmartCoin({ + parentCoinInfo: launcherCoinRecord.coin.parent_coin_info.replace('0x', ''), + puzzleHash: launcherCoinRecord.coin.puzzle_hash.replace('0x', ''), amount: launcherCoinRecord.coin.amount, }); - console.log(smartLauncherCoin); - let id = smartLauncherCoin.getId(); - console.log(id); + let id = launcherCoin.getId(); if (id) { const idBuffer: Buffer = Buffer.from(id, 'hex'); - return bech32m.encode('nft', bech32m.toWords(idBuffer)); } } diff --git a/src/pages/Minting.vue b/src/pages/Minting.vue index 6e310a0..ffc9b8c 100644 --- a/src/pages/Minting.vue +++ b/src/pages/Minting.vue @@ -10,7 +10,6 @@ import { IpcService } from '../helpers/ipc-service'; import { NftStorageUploader } from '../helpers/nft-storage'; import { chiaState } from '../state/chia'; import { shell } from 'electron'; -import { add_rate_limited_funds } from 'chia-agent/api/rpc'; const ipc = new IpcService();