diff --git a/README.md b/README.md index 71a44bc..8d9fb47 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Gitopia](https://img.shields.io/endpoint?style=&url=https://gitopia.org/mirror-badge.json)](https://gitopia.org/#/z_TqsbmVJOKzpuQH4YrYXv_Q0DrkwDwc0UqapRrE0Do/git-remote-gitopia) git remote helper for [Gitopia](https://gitopia.org) -0.01 AR or 10% of the transaction fee, whichever is greater, will be charged as PST fee on git push. You don’t require an Arweave wallet for cloning repositories hence it’s free. +You don’t require an Arweave wallet for cloning repositories hence it’s free. ## Installation diff --git a/bin/helper.js b/bin/helper.js index 8cc1c7e..e7b1e1c 100644 --- a/bin/helper.js +++ b/bin/helper.js @@ -19,7 +19,7 @@ import { newProgressBar } from "./lib/util.js"; import * as deepHash from "arweave/node/lib/deepHash.js"; import ArweaveBundles from "arweave-bundles"; -export const VERSION = "0.1.7"; +export const VERSION = "0.1.8"; const _timeout = async (duration) => { return new Promise((resolve, reject) => { diff --git a/bin/lib/arweave.js b/bin/lib/arweave.js index 9f31d7a..f058da8 100644 --- a/bin/lib/arweave.js +++ b/bin/lib/arweave.js @@ -119,34 +119,34 @@ export const postBundledTransaction = async ( bar.stop(); // Send fee to PST holders - const contractState = await smartweave.default.readContract( - arweave, - contractId - ); - const holder = smartweave.default.selectWeightedPstHolder( - contractState.balances - ); + // const contractState = await smartweave.default.readContract( + // arweave, + // contractId + // ); + // const holder = smartweave.default.selectWeightedPstHolder( + // contractState.balances + // ); // PST Fee - const txFee = new BigNumber(tx.reward); - const pstFee = txFee.multipliedBy(0.1); - - const quantity = pstFee.isGreaterThan( - BigNumber(arweave.ar.arToWinston("0.01")) - ) - ? pstFee.toFixed(0) - : arweave.ar.arToWinston("0.01"); - - const pstTx = await arweave.createTransaction( - { target: holder, quantity }, - wallet - ); - pstTx.addTag("Bundle-Txid", tx.id); - pstTx.addTag("Repo", repoName); - pstTx.addTag("Version", "0.0.2"); - pstTx.addTag("App-Name", "Gitopia"); - pstTx.addTag("Unix-Time", Math.round(new Date().getTime() / 1000).toString()); - - await arweave.transactions.sign(pstTx, wallet); - await arweave.transactions.post(pstTx); + // const txFee = new BigNumber(tx.reward); + // const pstFee = txFee.multipliedBy(0.1); + + // const quantity = pstFee.isGreaterThan( + // BigNumber(arweave.ar.arToWinston("0.01")) + // ) + // ? pstFee.toFixed(0) + // : arweave.ar.arToWinston("0.01"); + + // const pstTx = await arweave.createTransaction( + // { target: holder, quantity }, + // wallet + // ); + // pstTx.addTag("Bundle-Txid", tx.id); + // pstTx.addTag("Repo", repoName); + // pstTx.addTag("Version", "0.0.2"); + // pstTx.addTag("App-Name", "Gitopia"); + // pstTx.addTag("Unix-Time", Math.round(new Date().getTime() / 1000).toString()); + + // await arweave.transactions.sign(pstTx, wallet); + // await arweave.transactions.post(pstTx); }; diff --git a/package-lock.json b/package-lock.json index 2b27e6c..272d3ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@gitopia/git-remote-gitopia", - "version": "0.1.7", + "version": "0.1.8", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 1ccca6e..d87c257 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gitopia/git-remote-gitopia", - "version": "0.1.7", + "version": "0.1.8", "description": "git-remote-helper for Gitopia", "main": "bin/index.mjs", "bin": {