Skip to content

Commit

Permalink
fix(arweave): default to the arweave node import to avoid issues with…
Browse files Browse the repository at this point in the history
… browser environments

This is just a short-term hack. Suggest we make a PR to the arweave-js repo to export env specific arweave instances
  • Loading branch information
dtfiedler committed Apr 25, 2024
1 parent 7f285bb commit fc8c26e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"prepare": "husky install",
"example:mjs": "yarn build:esm && node examples/node/index.mjs",
"example:cjs": "yarn build:cjs && node examples/node/index.cjs",
"example:web": "yarn build:web && cp -r bundles/* examples/web && http-server --port 8080 --host -o examples/web"
"example:web": "yarn build:web && http-server --port 8080 --host -o examples/web"
},
"devDependencies": {
"@commitlint/cli": "^17.1.2",
Expand Down
2 changes: 1 addition & 1 deletion src/common/arweave.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import Arweave from 'arweave';
import { default as Arweave } from 'arweave/node';

export const defaultArweave = Arweave.init({
host: 'arweave.net',
Expand Down
2 changes: 1 addition & 1 deletion src/utils/smartweave.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import Arweave from 'arweave';
import { default as Arweave } from 'arweave/node';
import { EvaluationManifest } from 'warp-contracts';

import { RemoteContract, WarpContract } from '../common/index.js';
Expand Down

0 comments on commit fc8c26e

Please sign in to comment.