From 77c69292e0d6039e51cc725d2d2a14976b339867 Mon Sep 17 00:00:00 2001 From: Wizz Wallet <153743376+wizz-wallet-dev@users.noreply.github.com> Date: Fri, 14 Jun 2024 12:29:09 +0800 Subject: [PATCH 1/2] Remove unnecessary verbose parameters --- lib/cli.ts | 12 +++++------ lib/commands/download-command.ts | 8 ++++---- lib/commands/get-by-container-command.ts | 11 +++++----- lib/commands/get-by-realm-command.ts | 11 +++++----- lib/commands/get-by-ticker-command.ts | 7 +++---- lib/commands/get-subrealm-info-command.ts | 7 +++---- lib/commands/init-interactive-dft-command.ts | 8 ++++---- .../init-interactive-fixed-dft-command.ts | 16 +++++++-------- .../init-interactive-infinite-dft-command.ts | 20 +++++++++---------- .../mint-interactive-container-command.ts | 4 ++-- lib/commands/mint-interactive-ft-command.ts | 8 ++++---- ...interactive-subrealm-with-rules-command.ts | 2 +- lib/commands/resolve-command.ts | 11 +++++----- lib/index.ts | 8 ++++---- 14 files changed, 64 insertions(+), 69 deletions(-) diff --git a/lib/cli.ts b/lib/cli.ts index 8914a8c..d5d15b2 100644 --- a/lib/cli.ts +++ b/lib/cli.ts @@ -1265,7 +1265,7 @@ program.command('get') const config: ConfigurationInterface = validateCliInputs(); const atomicals = new Atomicals(ElectrumApi.createClient(process.env.ELECTRUMX_PROXY_BASE_URL || '')); const verbose = options.verbose ? true : false; - const result = await atomicals.resolveAtomical(atomicalAliasOrIdLC, AtomicalsGetFetchType.GET, undefined, verbose); + const result = await atomicals.resolveAtomical(atomicalAliasOrIdLC, AtomicalsGetFetchType.GET); handleResultLogging(result); } catch (error) { console.log(error); @@ -1311,7 +1311,7 @@ program.command('location') await validateWalletStorage(); const config: ConfigurationInterface = validateCliInputs(); const atomicals = new Atomicals(ElectrumApi.createClient(process.env.ELECTRUMX_PROXY_BASE_URL || '')); - const result = await atomicals.resolveAtomical(atomicalAliasOrId, AtomicalsGetFetchType.LOCATION, undefined, options.verbose); + const result = await atomicals.resolveAtomical(atomicalAliasOrId, AtomicalsGetFetchType.LOCATION); handleResultLogging(result); } catch (error) { console.log(error); @@ -1343,7 +1343,7 @@ program.command('state') const config: ConfigurationInterface = validateCliInputs(); const atomicals = new Atomicals(ElectrumApi.createClient(process.env.ELECTRUMX_PROXY_BASE_URL || '')); const verbose = options.verbose ? true : false; - const result = await atomicals.resolveAtomical(atomicalAliasOrId, AtomicalsGetFetchType.STATE, verbose); + const result = await atomicals.resolveAtomical(atomicalAliasOrId, AtomicalsGetFetchType.STATE); handleResultLogging(result); } catch (error) { console.log(error); @@ -1360,7 +1360,7 @@ program.command('state-history') const config: ConfigurationInterface = validateCliInputs(); const atomicals = new Atomicals(ElectrumApi.createClient(process.env.ELECTRUMX_PROXY_BASE_URL || '')); const verbose = options.verbose ? true : false; - const result = await atomicals.resolveAtomical(atomicalAliasOrId, AtomicalsGetFetchType.STATE_HISTORY, undefined, verbose); + const result = await atomicals.resolveAtomical(atomicalAliasOrId, AtomicalsGetFetchType.STATE_HISTORY); handleResultLogging(result); } catch (error) { console.log(error); @@ -1377,7 +1377,7 @@ program.command('events') const config: ConfigurationInterface = validateCliInputs(); const atomicals = new Atomicals(ElectrumApi.createClient(process.env.ELECTRUMX_PROXY_BASE_URL || '')); const verbose = options.verbose ? true : false; - const result = await atomicals.resolveAtomical(atomicalAliasOrId, AtomicalsGetFetchType.EVENT_HISTORY, undefined, verbose); + const result = await atomicals.resolveAtomical(atomicalAliasOrId, AtomicalsGetFetchType.EVENT_HISTORY); handleResultLogging(result); } catch (error) { console.log(error); @@ -2061,7 +2061,7 @@ program.command('tx-history') const config: ConfigurationInterface = validateCliInputs(); const atomicals = new Atomicals(ElectrumApi.createClient(process.env.ELECTRUMX_PROXY_BASE_URL || '')); const verbose = options.verbose ? true : false; - const result = await atomicals.resolveAtomical(atomicalAliasOrId, AtomicalsGetFetchType.TX_HISTORY, undefined, verbose); + const result = await atomicals.resolveAtomical(atomicalAliasOrId, AtomicalsGetFetchType.TX_HISTORY); handleResultLogging(result); } catch (error) { console.log(error); diff --git a/lib/commands/download-command.ts b/lib/commands/download-command.ts index c7a84da..d05c7d6 100644 --- a/lib/commands/download-command.ts +++ b/lib/commands/download-command.ts @@ -80,7 +80,7 @@ export const writeFiles = async (inputIndexToFilesMap: any, txDir: string): Prom const fullPath = inputTxDir + `/${fileNameWithExtension}` await fileWriter(fullPath, JSON.stringify(fileEntry, null, 2)); const contentLength = fileEntry.length; - const body = fileEntry + const body = fileEntry fileSummary[inputIndex]['files'][filename] = { filename, fileNameWithExtension, @@ -98,14 +98,14 @@ export const writeFiles = async (inputIndexToFilesMap: any, txDir: string): Prom return fileSummary; } export class DownloadCommand implements CommandInterface { - constructor( + constructor( private electrumApi: ElectrumApiInterface, private atomicalIdOrTxId: string, ) { } async run(): Promise { const txid = getTxIdFromAtomicalId(this.atomicalIdOrTxId); - const txResult = await this.electrumApi.getTx(txid, false); + const txResult = await this.electrumApi.getTx(txid); if (!txResult || !txResult.success) { throw `transaction not found ${txid}`; @@ -130,4 +130,4 @@ export class DownloadCommand implements CommandInterface { } }; } -} \ No newline at end of file +} diff --git a/lib/commands/get-by-container-command.ts b/lib/commands/get-by-container-command.ts index 9f3b0ee..d26d90a 100644 --- a/lib/commands/get-by-container-command.ts +++ b/lib/commands/get-by-container-command.ts @@ -4,14 +4,13 @@ import { decorateAtomical } from "../utils/atomical-format-helpers"; import { GetCommand } from "./get-command"; export class GetByContainerCommand implements CommandInterface { - - constructor( + + constructor( private electrumApi: ElectrumApiInterface, private container: string, private fetchType: AtomicalsGetFetchType = AtomicalsGetFetchType.GET, - private verbose?: boolean ) { - + } async run(): Promise { @@ -23,7 +22,7 @@ export class GetByContainerCommand implements CommandInterface { data: responseResult.result } } - const getDefaultCommand = new GetCommand(this.electrumApi, responseResult.result.atomical_id, this.fetchType, this.verbose); + const getDefaultCommand = new GetCommand(this.electrumApi, responseResult.result.atomical_id, this.fetchType); const getDefaultCommandResponse = await getDefaultCommand.run(); const updatedRes = Object.assign({}, getDefaultCommandResponse.data, @@ -36,4 +35,4 @@ export class GetByContainerCommand implements CommandInterface { data: updatedRes } } -} \ No newline at end of file +} diff --git a/lib/commands/get-by-realm-command.ts b/lib/commands/get-by-realm-command.ts index 8d71db2..a20875f 100644 --- a/lib/commands/get-by-realm-command.ts +++ b/lib/commands/get-by-realm-command.ts @@ -4,23 +4,22 @@ import { decorateAtomical } from "../utils/atomical-format-helpers"; import { GetCommand } from "./get-command"; export class GetByRealmCommand implements CommandInterface { - + constructor(private electrumApi: ElectrumApiInterface, private realm: string, private fetchType: AtomicalsGetFetchType = AtomicalsGetFetchType.GET, - private verbose?: boolean ) { - + } async run(): Promise { - const responseResult = await this.electrumApi.atomicalsGetRealmInfo(this.realm, this.verbose); + const responseResult = await this.electrumApi.atomicalsGetRealmInfo(this.realm); if (!responseResult.result || !responseResult.result.atomical_id) { return { success: false, data: responseResult.result } } - const getDefaultCommand = new GetCommand( this.electrumApi, responseResult.result.atomical_id, this.fetchType, this.verbose); + const getDefaultCommand = new GetCommand( this.electrumApi, responseResult.result.atomical_id, this.fetchType); const getDefaultCommandResponse = await getDefaultCommand.run(); const updatedRes = Object.assign({}, getDefaultCommandResponse.data, @@ -33,4 +32,4 @@ export class GetByRealmCommand implements CommandInterface { data: updatedRes } } -} \ No newline at end of file +} diff --git a/lib/commands/get-by-ticker-command.ts b/lib/commands/get-by-ticker-command.ts index a921ebf..7592f23 100644 --- a/lib/commands/get-by-ticker-command.ts +++ b/lib/commands/get-by-ticker-command.ts @@ -4,11 +4,10 @@ import { decorateAtomical } from "../utils/atomical-format-helpers"; import { GetCommand } from "./get-command"; export class GetByTickerCommand implements CommandInterface { - constructor( + constructor( private electrumApi: ElectrumApiInterface, private ticker: string, private fetchType: AtomicalsGetFetchType = AtomicalsGetFetchType.GET, - private verbose?: boolean ) { } @@ -21,7 +20,7 @@ export class GetByTickerCommand implements CommandInterface { data: responseResult.result } } - const getDefaultCommand = new GetCommand(this.electrumApi, responseResult.result.atomical_id, this.fetchType, this.verbose); + const getDefaultCommand = new GetCommand(this.electrumApi, responseResult.result.atomical_id, this.fetchType); const getDefaultCommandResponse = await getDefaultCommand.run(); const updatedRes = Object.assign({}, getDefaultCommandResponse.data, @@ -34,4 +33,4 @@ export class GetByTickerCommand implements CommandInterface { data: updatedRes } } -} \ No newline at end of file +} diff --git a/lib/commands/get-subrealm-info-command.ts b/lib/commands/get-subrealm-info-command.ts index 73f72a3..6b5ea69 100644 --- a/lib/commands/get-subrealm-info-command.ts +++ b/lib/commands/get-subrealm-info-command.ts @@ -11,19 +11,18 @@ export interface GetSubrealmInfoCommandResultInterface { } export class GetRealmInfoCommand implements CommandInterface { - constructor( + constructor( private electrumApi: ElectrumApiInterface, private realmOrSubrealm: any, - private verbose?: boolean ) { } async run(): Promise { - const responseResult = await this.electrumApi.atomicalsGetRealmInfo(this.realmOrSubrealm, this.verbose); + const responseResult = await this.electrumApi.atomicalsGetRealmInfo(this.realmOrSubrealm); return { success: true, data: responseResult.result } } -} \ No newline at end of file +} diff --git a/lib/commands/init-interactive-dft-command.ts b/lib/commands/init-interactive-dft-command.ts index 2c33971..7dfa08a 100644 --- a/lib/commands/init-interactive-dft-command.ts +++ b/lib/commands/init-interactive-dft-command.ts @@ -62,7 +62,7 @@ export class InitInteractiveDftCommand implements CommandInterface { if (this.maxMints > 500000 || this.maxMints < 10000) { throw new Error('Command line tool expects max mints to be between 10,000 and 500,000') } - + if (this.mintAmount > 100000000 || this.mintAmount < 546) { throw new Error('mint amount must be between 546 and 100,000,000') } @@ -103,7 +103,7 @@ export class InitInteractiveDftCommand implements CommandInterface { console.log('Mint Amount', this.mintAmount); console.log('Data objects: ', filesData); console.log('-----------------------') - + if (this.mintBitworkc?.length < 5) { console.log('WARNING: Mint Bitworkc is too easy to mine and can be mined in less than a minute or faster. Confirm if that is acceptable.', this.mintBitworkc); } @@ -118,7 +118,7 @@ export class InitInteractiveDftCommand implements CommandInterface { await promptContinue(); - const getExistingNameCommand = new GetByTickerCommand(this.electrumApi, this.requestTicker, AtomicalsGetFetchType.GET, undefined); + const getExistingNameCommand = new GetByTickerCommand(this.electrumApi, this.requestTicker, AtomicalsGetFetchType.GET); try { const getExistingNameResult = await getExistingNameCommand.run(); if (getExistingNameResult.success && getExistingNameResult.data) { @@ -202,4 +202,4 @@ export class InitInteractiveDftCommand implements CommandInterface { } } -} \ No newline at end of file +} diff --git a/lib/commands/init-interactive-fixed-dft-command.ts b/lib/commands/init-interactive-fixed-dft-command.ts index 478281a..0ca6a66 100644 --- a/lib/commands/init-interactive-fixed-dft-command.ts +++ b/lib/commands/init-interactive-fixed-dft-command.ts @@ -63,7 +63,7 @@ export class InitInteractiveFixedDftCommand implements CommandInterface { if (this.maxMints > 10000000 || this.maxMints < 10000) { throw new Error('Command line tool expects max mints to be between 10,000 and 10,000,000') } - + if (this.mintAmount > 100000000 || this.mintAmount < 546) { throw new Error('mint amount must be between 546 and 100,000,000') } @@ -77,15 +77,15 @@ export class InitInteractiveFixedDftCommand implements CommandInterface { if (!filesData['name']) { throw new Error('Please set a name in the files metadata. See examples in /templates/fungible-tokens') } - + if (!filesData['legal']) { throw new Error('Please set legal in the files metadata. See examples in /templates/fungible-tokens') } - + if (!filesData['legal']['terms']) { throw new Error('Please set legal terms in the files metadata. See examples in /templates/fungible-tokens') } - + if (!this.noimage && filesData['image']) { // Ex: atom:btc:dat:/image.png const re = /atom\:btc\:dat\:[a-f0-9]{64}i0\/.*\.(png|jpeg|svg|jpg|gif|webp)/ @@ -99,7 +99,7 @@ export class InitInteractiveFixedDftCommand implements CommandInterface { name: this.requestTicker.toUpperCase() } } - + console.log('Initializing Fixed Decentralized FT Token') console.log('-----------------------') @@ -115,7 +115,7 @@ export class InitInteractiveFixedDftCommand implements CommandInterface { console.log('Mint Amount: ', this.mintAmount); console.log('Data objects: ', filesData); console.log('-----------------------') - + if (this.mintBitworkCommit?.length < 5) { console.log('WARNING: Mint Bitworkc is too easy to mine and can be mined in less than a minute or faster. Confirm if that is acceptable.', this.mintBitworkCommit); } @@ -130,7 +130,7 @@ export class InitInteractiveFixedDftCommand implements CommandInterface { await promptContinue(); - const getExistingNameCommand = new GetByTickerCommand(this.electrumApi, this.requestTicker, AtomicalsGetFetchType.GET, undefined); + const getExistingNameCommand = new GetByTickerCommand(this.electrumApi, this.requestTicker, AtomicalsGetFetchType.GET); try { const getExistingNameResult = await getExistingNameCommand.run(); if (getExistingNameResult.success && getExistingNameResult.data) { @@ -215,4 +215,4 @@ export class InitInteractiveFixedDftCommand implements CommandInterface { } } -} \ No newline at end of file +} diff --git a/lib/commands/init-interactive-infinite-dft-command.ts b/lib/commands/init-interactive-infinite-dft-command.ts index 7e7bf77..5b5f919 100644 --- a/lib/commands/init-interactive-infinite-dft-command.ts +++ b/lib/commands/init-interactive-infinite-dft-command.ts @@ -68,7 +68,7 @@ export class InitInteractiveInfiniteDftCommand implements CommandInterface { if (this.maxMints > 100000 || this.maxMints < 1) { throw new Error('Command line tool expects max mints to be between 1 and 100,000') } - + if (this.mintAmount > 100000000 || this.mintAmount < 546) { throw new Error('mint amount must be between 546 and 100,000,000') } @@ -82,15 +82,15 @@ export class InitInteractiveInfiniteDftCommand implements CommandInterface { if (!filesData['name']) { throw new Error('Please set a name in the files metadata. See examples in /templates/fungible-tokens') } - + if (!filesData['legal']) { throw new Error('Please set legal in the files metadata. See examples in /templates/fungible-tokens') } - + if (!filesData['legal']['terms']) { throw new Error('Please set legal terms in the files metadata. See examples in /templates/fungible-tokens') } - + if (!this.noimage && filesData['image']) { // Ex: atom:btc:dat:/image.png const re = /atom\:btc\:dat\:[a-f0-9]{64}i0\/.*\.(png|jpeg|svg|jpg|gif|webp)/ @@ -104,7 +104,7 @@ export class InitInteractiveInfiniteDftCommand implements CommandInterface { name: this.requestTicker.toUpperCase() } } - + console.log('Initializing Infinite Decentralized FT Token') console.log('-----------------------') console.log('Total Supply (Satoshis): unbounded'); @@ -121,7 +121,7 @@ export class InitInteractiveInfiniteDftCommand implements CommandInterface { console.log('Mint Amount: ', this.mintAmount); console.log('Data objects: ', filesData); console.log('-----------------------') - + if (this.mintBitworkCommitIncrement < 1 || this.mintBitworkCommitIncrement > 64) { throw new Error('Error: Mint Bitwork Commit Increment must be between 1 and 64') } @@ -134,7 +134,7 @@ export class InitInteractiveInfiniteDftCommand implements CommandInterface { } await promptContinue(); - const getExistingNameCommand = new GetByTickerCommand(this.electrumApi, this.requestTicker, AtomicalsGetFetchType.GET, undefined); + const getExistingNameCommand = new GetByTickerCommand(this.electrumApi, this.requestTicker, AtomicalsGetFetchType.GET); try { const getExistingNameResult = await getExistingNameCommand.run(); if (getExistingNameResult.success && getExistingNameResult.data) { @@ -174,7 +174,7 @@ export class InitInteractiveInfiniteDftCommand implements CommandInterface { mint_height: Number(this.mintHeight), max_mints: Number(this.maxMints), }; - + // Set mint mode = perpetual/infinite args['md'] = 1 args['bv'] = this.mintBitworkVector @@ -201,7 +201,7 @@ export class InitInteractiveInfiniteDftCommand implements CommandInterface { args['maxg'] = this.maxGlobalMints; } - + atomicalBuilder.setArgs(args); // Set to request a container atomicalBuilder.setRequestTicker(this.requestTicker); @@ -233,4 +233,4 @@ export class InitInteractiveInfiniteDftCommand implements CommandInterface { } } -} \ No newline at end of file +} diff --git a/lib/commands/mint-interactive-container-command.ts b/lib/commands/mint-interactive-container-command.ts index 47bdef1..049f18e 100644 --- a/lib/commands/mint-interactive-container-command.ts +++ b/lib/commands/mint-interactive-container-command.ts @@ -31,7 +31,7 @@ export class MintInteractiveContainerCommand implements CommandInterface { } async run(): Promise { // Check if the request already exists - const getExistingNameCommand = new GetByContainerCommand(this.electrumApi, this.requestContainer, AtomicalsGetFetchType.GET, undefined); + const getExistingNameCommand = new GetByContainerCommand(this.electrumApi, this.requestContainer, AtomicalsGetFetchType.GET); try { const getExistingNameResult = await getExistingNameCommand.run(); if (getExistingNameResult.success && getExistingNameResult.data) { @@ -100,4 +100,4 @@ export class MintInteractiveContainerCommand implements CommandInterface { data: result } } -} \ No newline at end of file +} diff --git a/lib/commands/mint-interactive-ft-command.ts b/lib/commands/mint-interactive-ft-command.ts index 306020c..7d50d1c 100644 --- a/lib/commands/mint-interactive-ft-command.ts +++ b/lib/commands/mint-interactive-ft-command.ts @@ -66,16 +66,16 @@ export class MintInteractiveFtCommand implements CommandInterface { console.log('Total Supply (Satoshis): ', this.supply); console.log('Total Supply (BTC): ', this.supply / 100000000); let supply = this.supply; - + let expandedSupply = supply; - + console.log('Total Supply: ', expandedSupply); console.log('Data objects: ', filesData); console.log('-----------------------') await promptContinue(); - const getExistingNameCommand = new GetByTickerCommand(this.electrumApi, this.requestTicker, AtomicalsGetFetchType.GET, undefined); + const getExistingNameCommand = new GetByTickerCommand(this.electrumApi, this.requestTicker, AtomicalsGetFetchType.GET); try { const getExistingNameResult = await getExistingNameCommand.run(); if (getExistingNameResult.success && getExistingNameResult.data) { @@ -138,4 +138,4 @@ export class MintInteractiveFtCommand implements CommandInterface { } } -} \ No newline at end of file +} diff --git a/lib/commands/mint-interactive-subrealm-with-rules-command.ts b/lib/commands/mint-interactive-subrealm-with-rules-command.ts index 9dde610..ccf5201 100644 --- a/lib/commands/mint-interactive-subrealm-with-rules-command.ts +++ b/lib/commands/mint-interactive-subrealm-with-rules-command.ts @@ -37,7 +37,7 @@ export class MintInteractiveSubrealmWithRulesCommand implements CommandInterface const finalSubrealmPart = realmParts[realmParts.length - 1]; // Step 1. Query the full realm and determine if it's already claimed - const getSubrealmCommand = new GetByRealmCommand(this.electrumApi, this.requestSubrealm, AtomicalsGetFetchType.LOCATION, true); + const getSubrealmCommand = new GetByRealmCommand(this.electrumApi, this.requestSubrealm, AtomicalsGetFetchType.LOCATION); const getSubrealmReponse = await getSubrealmCommand.run(); if (getSubrealmReponse.data.atomical_id) { return { diff --git a/lib/commands/resolve-command.ts b/lib/commands/resolve-command.ts index 9bd3717..5323756 100644 --- a/lib/commands/resolve-command.ts +++ b/lib/commands/resolve-command.ts @@ -11,7 +11,6 @@ export class ResolveCommand implements CommandInterface { private electrumApi: ElectrumApiInterface, private atomicalAliasOrId: any, private fetchType: AtomicalsGetFetchType = AtomicalsGetFetchType.GET, - private verbose?: boolean ) { } @@ -20,13 +19,13 @@ export class ResolveCommand implements CommandInterface { let foundAtomicalResponse; let cmd; if (atomicalType.type === AtomicalIdentifierType.ATOMICAL_ID || atomicalType.type === AtomicalIdentifierType.ATOMICAL_NUMBER) { - cmd = new GetCommand(this.electrumApi, atomicalType.providedIdentifier || '', this.fetchType, this.verbose); + cmd = new GetCommand(this.electrumApi, atomicalType.providedIdentifier || '', this.fetchType); } else if (atomicalType.type === AtomicalIdentifierType.REALM_NAME) { - cmd = new GetByRealmCommand(this.electrumApi, atomicalType.realmName || '', this.fetchType, this.verbose); + cmd = new GetByRealmCommand(this.electrumApi, atomicalType.realmName || '', this.fetchType); } else if (atomicalType.type === AtomicalIdentifierType.CONTAINER_NAME) { - cmd = new GetByContainerCommand(this.electrumApi, atomicalType.containerName || '', this.fetchType, this.verbose); + cmd = new GetByContainerCommand(this.electrumApi, atomicalType.containerName || '', this.fetchType); } else if (atomicalType.type === AtomicalIdentifierType.TICKER_NAME) { - cmd = new GetByTickerCommand(this.electrumApi, atomicalType.tickerName || '', this.fetchType, this.verbose); + cmd = new GetByTickerCommand(this.electrumApi, atomicalType.tickerName || '', this.fetchType); } const cmdResponse = await cmd.run(); if (!cmdResponse || !cmdResponse.success) { @@ -44,4 +43,4 @@ export class ResolveCommand implements CommandInterface { data: updatedRes } } -} \ No newline at end of file +} diff --git a/lib/index.ts b/lib/index.ts index c7567e1..0af8dae 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -872,10 +872,10 @@ export class Atomicals implements APIInterface { } } - async resolveAtomical(atomicalIdOrNumberOrVariousName: string, atomicalsGetFetchType: AtomicalsGetFetchType, verbose = false, keepElectrumAlive = false): Promise { + async resolveAtomical(atomicalIdOrNumberOrVariousName: string, atomicalsGetFetchType: AtomicalsGetFetchType, keepElectrumAlive = false): Promise { try { await this.electrumApi.open(); - const command: CommandInterface = new ResolveCommand(this.electrumApi, atomicalIdOrNumberOrVariousName, atomicalsGetFetchType, verbose); + const command: CommandInterface = new ResolveCommand(this.electrumApi, atomicalIdOrNumberOrVariousName, atomicalsGetFetchType); return await command.run(); } catch (error: any) { return { @@ -890,10 +890,10 @@ export class Atomicals implements APIInterface { } } - async getRealmInfo(atomicalIdOrNumberOrVariousName: string, verbose = false, keepElectrumAlive = false): Promise { + async getRealmInfo(atomicalIdOrNumberOrVariousName: string, keepElectrumAlive = false): Promise { try { await this.electrumApi.open(); - const command: CommandInterface = new GetRealmInfoCommand(this.electrumApi, atomicalIdOrNumberOrVariousName, verbose); + const command: CommandInterface = new GetRealmInfoCommand(this.electrumApi, atomicalIdOrNumberOrVariousName); return await command.run(); } catch (error: any) { return { From d605e4670edf838bbbd8f136156e8fb92589b705 Mon Sep 17 00:00:00 2001 From: Wizz Wallet <153743376+wizz-wallet-dev@users.noreply.github.com> Date: Fri, 14 Jun 2024 12:30:30 +0800 Subject: [PATCH 2/2] Fix tests on pull requests --- .github/workflows/test.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ea600ac..0f3d82b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,11 +2,9 @@ name: Test on: push: - branches: - - '**' pull_request: - branches: - - 'master' + branches: + - 'main' jobs: build: