From 7c4296f02c3adee896769cc872527e1c3ba44823 Mon Sep 17 00:00:00 2001 From: Jamie Hewitt Date: Wed, 16 Oct 2024 15:39:33 +0300 Subject: [PATCH 1/3] Removing .env from git --- .env | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 .env diff --git a/.env b/.env deleted file mode 100644 index 199cd1e..0000000 --- a/.env +++ /dev/null @@ -1,3 +0,0 @@ -RPC_URL=http://127.0.0.1:8545 -PRIVATE_KEY=0x1d751ded5a32226054cd2e71261039b65afb9ee1c746d055dd699b1150a5befc -OCEAN_NODE_URL=http://127.0.0.1:8001 \ No newline at end of file From ffb6f0bbe2ca00c92537b0ffd8798a2da438a1ad Mon Sep 17 00:00:00 2001 From: Jamie Hewitt Date: Wed, 16 Oct 2024 15:40:16 +0300 Subject: [PATCH 2/3] Updating gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f17d49e..d7d6b97 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ node_modules/ dist/ out/ -.vscode-test/ \ No newline at end of file +.vscode-test/ +.env \ No newline at end of file From df447ea9cf5876df2cb7dfe180ee18cd0577f5bf Mon Sep 17 00:00:00 2001 From: Jamie Hewitt Date: Wed, 16 Oct 2024 15:45:26 +0300 Subject: [PATCH 3/3] Removing unnecessary information messages --- src/extension.ts | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index d821201..9fcb1bb 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -40,10 +40,10 @@ export function activate(context: vscode.ExtensionContext) { if (asset) { const details = ` - Name: ${asset.metadata.name} - Type: ${asset.metadata.type} - Description: ${asset.metadata.description} - Author: ${asset.metadata.author} + Name: ${asset.metadata.name}\n + Type: ${asset.metadata.type}\n + Description: ${asset.metadata.description}\n + Author: ${asset.metadata.author}\n ` vscode.window.showInformationMessage(details) } else { @@ -65,9 +65,6 @@ export function activate(context: vscode.ExtensionContext) { let publishAsset = vscode.commands.registerCommand( 'ocean-protocol.publishAsset', async (config: any, filePath: string, privateKey: string) => { - vscode.window.showInformationMessage(`Private key: ${privateKey}`) - vscode.window.showInformationMessage(`File path: ${filePath}`) - vscode.window.showInformationMessage(`Config: ${JSON.stringify(config)}`) if (!filePath) { vscode.window.showErrorMessage('No file path provided.') return @@ -77,14 +74,15 @@ export function activate(context: vscode.ExtensionContext) { vscode.window.showErrorMessage('No private key provided.') return } + vscode.window.showInformationMessage('Publishing asset') try { // Read the file const fileContent = fs.readFileSync(filePath, 'utf8') - vscode.window.showInformationMessage('File content read successfully.') + console.log('File content read successfully.') const asset: Asset = JSON.parse(fileContent) - vscode.window.showInformationMessage('Asset JSON parsed successfully.') + console.log('Asset JSON parsed successfully.') // Set up the signer const provider = new ethers.providers.JsonRpcProvider(process.env.RPC) @@ -98,12 +96,11 @@ export function activate(context: vscode.ExtensionContext) { console.log('Signer:', signer) const chainId = await signer.getChainId() console.log('Chain ID:', chainId) - vscode.window.showInformationMessage(`Signer: ${signer}`) // Test provider connectivity try { const network = provider.network - vscode.window.showInformationMessage(`Connected to network: ${network}`) + console.log(`Connected to network: ${network}`) } catch (networkError) { console.error('Error connecting to network:', networkError) vscode.window.showErrorMessage( @@ -120,11 +117,8 @@ export function activate(context: vscode.ExtensionContext) { const aquarius = new Aquarius(config.aquariusUrl) console.log('Chain ID:', chainId) - vscode.window.showInformationMessage(`Chain ID: ${chainId}`) const oceanConfig = new ConfigHelper().getConfig(chainId) - vscode.window.showInformationMessage( - `Ocean Config: ${JSON.stringify(oceanConfig)}` - ) + console.log('Ocean Config:', oceanConfig) console.log('creating asset:', asset)