Skip to content

Commit 582d86a

Browse files
committed
Merge remote-tracking branch 'gagdiez/dev'
2 parents f0b4afb + e2608c2 commit 582d86a

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## 2.7.0
4+
- FEAT: Made optional to logout the wallet selector when connecting to a contract different from `config.contractName`
5+
6+
- To enable this feature, pass the allowOtherContracts flag to the config parameter of initNear: `initNear({networkId, selector, config: { allowOtherContracts: true }} )`
7+
8+
- This feature is disabled by default to keep retrocompatibility
9+
310
## 2.6.0
411

512
- Support multiple Limited Access Keys on BOS gateway to enable "Don't ask me again" when interacting with third-party contracts on BOS. See https://github.com/NearSocial/VM/issues/148

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib/data/account.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ async function updateAccount(near, walletState) {
2222
near.connectedContractId = walletState?.contract?.contractId;
2323
if (
2424
near.connectedContractId &&
25-
near.connectedContractId !== near.config.contractName
25+
near.connectedContractId !== near.config.contractName &&
26+
!near.config.allowOtherContracts
2627
) {
2728
const selector = await near.selector;
2829
const wallet = await selector.wallet();

src/lib/data/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const OneNear = Big(10).pow(24);
1414
const AccountSafetyMargin = OneNear.div(2);
1515
export const ErrorScopes = {
1616
"Boundary": "Component triggered an Error Boundary",
17-
"Compliation": "Compilation error",
17+
"Compilation": "Compilation error",
1818
"Execution": "Execution error",
1919
"Render": "Render error",
2020
"Source": "Source code not found"

0 commit comments

Comments
 (0)