Skip to content

Commit

Permalink
Merge pull request #7 from NearSocial/remove-selector-deps
Browse files Browse the repository at this point in the history
Remove wallet selector dependencies
  • Loading branch information
Evgeny Kuzyakov authored Mar 1, 2023
2 parents 07182e2 + f7b3904 commit 2405564
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 645 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.0.0

- BREAKING: Removed Wallet Selector dependency. `selector` object is required to pass into `initNear` from `useInitNear` hook.

## 0.3.0

- Add support to hashtags for `Markdown` component. Expose `onHashtag` similar to `onMention`.
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

9 changes: 1 addition & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
{
"name": "near-social-vm",
"version": "0.3.0",
"version": "1.0.0",
"description": "Near Social VM",
"main": "dist/index.js",
"files": [
"dist"
],
"dependencies": {
"@braintree/sanitize-url": "6.0.0",
"@near-wallet-selector/core": "^7.4.0",
"@near-wallet-selector/here-wallet": "^7.4.0",
"@near-wallet-selector/meteor-wallet": "^7.4.0",
"@near-wallet-selector/my-near-wallet": "^7.4.0",
"@near-wallet-selector/near-wallet": "^7.4.0",
"@near-wallet-selector/neth": "^7.4.0",
"@near-wallet-selector/sender": "^7.4.0",
"acorn": "^8.8.0",
"acorn-jsx": "^5.3.2",
"big.js": "^6.1.1",
Expand Down
24 changes: 1 addition & 23 deletions src/lib/data/near.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
import * as nearAPI from "near-api-js";
import Big from "big.js";
import { useEffect, useMemo, useState } from "react";
import { setupWalletSelector } from "@near-wallet-selector/core";
import { setupNearWallet } from "@near-wallet-selector/near-wallet";
import { setupMyNearWallet } from "@near-wallet-selector/my-near-wallet";
import { setupSender } from "@near-wallet-selector/sender";
import { setupHereWallet } from "@near-wallet-selector/here-wallet";
import { setupMeteorWallet } from "@near-wallet-selector/meteor-wallet";
import { setupNeth } from "@near-wallet-selector/neth";
import { singletonHook } from "react-singleton-hook";
import { MaxGasPerTransaction, TGas } from "./utils";

Expand Down Expand Up @@ -225,22 +218,7 @@ async function _initNear({ networkId, config, keyStore, selector } = {}) {
config = Object.assign({}, config, TestNearConfig);
}
keyStore = keyStore ?? new nearAPI.keyStores.BrowserLocalStorageKeyStore();
selector =
selector ??
setupWalletSelector({
network: config.networkId,
modules: [
setupNearWallet(),
setupMyNearWallet(),
setupSender(),
setupHereWallet(),
setupMeteorWallet(),
setupNeth({
gas: "300000000000000",
bundle: false,
}),
],
});


const nearConnection = await nearAPI.connect(
Object.assign({ deps: { keyStore } }, config)
Expand Down
Loading

0 comments on commit 2405564

Please sign in to comment.