Skip to content

Latest commit

 

History

History
376 lines (189 loc) · 18 KB

CHANGELOG.md

File metadata and controls

376 lines (189 loc) · 18 KB

1.5.5 (2022-03-19)

Bug Fixes

  • react-native compatibility for v0.64+ (b906444)

1.5.4 (2022-03-16)

Bug Fixes

1.5.3 (2022-03-15)

Bug Fixes

1.5.2 (2022-03-15)

Bug Fixes

  • deps: bump axios from 0.24.0 to 0.26.1 (#288) (240c3f0)
  • deps: bump ethers from 5.5.3 to 5.6.0 (#287) (3632dd6)

1.5.1 (2022-03-15)

Bug Fixes

  • send sessionToken with apiRequest for correct rate-limiting (bef928b)

1.5.0 (2022-03-15)

Bug Fixes

  • deps: bump follow-redirects from 1.14.7 to 1.14.9 (#270) (181edf1)

Features

  • add metrics for start event (28bb292)

1.4.1 (2022-03-15)

Bug Fixes

1.4.0 (2022-03-14)

Features

1.3.5 (2022-03-01)

Bug Fixes

  • prevent deletion of params in api call (#276) (505df2b)

1.3.4 (2022-03-01)

Bug Fixes

1.3.3 (2022-03-01)

Bug Fixes

  • better authentication types for connectors (#274) (d608166)

1.3.2 (2022-02-14)

Bug Fixes

  • use secure signing message for link action (#261) (f3be548)

1.3.1 (2022-02-09)

Bug Fixes

  • FromWei type from number to string (#257) (fdb5804)
  • overloaded functions for executeFunction (#256) (28b2468)

1.3.0 (2022-02-09)

Features

  • add web3Auth as connection method (a7724f1)

1.2.7 (2022-02-07)

Bug Fixes

  • newsession param for walletconnect and magic (a0928dc)
  • prevent cleanup when enabling web3 (01a7cd0)
  • prevent double cleanup on authentication (bc4abe1)
  • types for anyNetwork in enableWeb3 (4573a8a)

1.2.6 (2022-02-04)

Bug Fixes

  • account for metamask disconnect issue (#252) (8664602)

1.2.5 (2022-02-04)

Bug Fixes

  • cleanup web3 on logout (#250) (d676d87)
  • expose setting of 'any' network on provider (#251) (16537fa)
  • preserve sessions for walletconnect and magic (#249) (82c33e6)

1.2.4 (2022-01-31)

Bug Fixes

  • filter console warnings of magic and wc (#238) (dec4e2e)

1.2.3 (2022-01-28)

Bug Fixes

  • type gen for web3Api when no queryparam (#236) (515c86d)

1.2.2 (2022-01-28)

Bug Fixes

1.2.1 (2022-01-28)

Bug Fixes

1.2.0 (2022-01-27)

Features

  • add authentication via MagicLink (9420eb9)

1.1.2 (2022-01-26)

Bug Fixes

  • set default address for Web3API and SolanaAPI (57d15cc)

1.1.1 (2022-01-26)

Bug Fixes

  • avoid duplicate enableWeb3 calls (8df9484)
  • better error message when no appId provided (225a696)
  • expose Moralis.web3Library (59a7c28)

1.1.0 (2022-01-21)

Features

1.0.7 (2022-01-20)

Bug Fixes

1.0.6 (2022-01-20)

Bug Fixes

  • filter out walletconnect dependency warning (#220) (31e94ac)
  • include details on WEB3_DEACTIVATED event (#218) (f2fe3e1)
  • move MoralisWeb3 types to Moralis (#219) (945e79b)

1.0.5 (2022-01-20)

Bug Fixes

1.0.4 (2022-01-20)

Bug Fixes

1.0.3 (2022-01-19)

Bug Fixes

1.0.2 (2022-01-19)

Bug Fixes

1.0.1 (2022-01-17)

Bug Fixes

  • re-add isMetaMaskInstalled (4673e18)

1.0.0 (2022-01-17)

  • Removed dependency of web3.js in favour of ethers.js
  • Introducing custom connectors

BREAKING CHANGES

Moralis.web3 and Moralis.enableWeb3

Moralis.web3 and Moralis.enableWeb3 will now return an instance of Ethers.js instead of an instance of Web3.js. To account for these changes you should

  1. Adjust your code to use the Ethers.js library

Or

  1. Initialize your own Web3 library by using Moralis.provider
import Web3 from 'web3'
import Moralis from 'moralis'

await Moralis.enableWeb3()
const web3 = new Web3(Moralis.provider)

Return values of Moralis.executeFunction and Moralis.transfer

Return values are changed for Moralis.executeFunction and Moralis.transfer. They are now a transaction response from Ethers.js: This object contains all data about the transaction. If you need data about the result of the transation, then you need to wait for the transaction to be confirmed.

You can do this via transaction.wait() to wait for 1 confirmation (or transaction.wait(5) to wait for 5 confirmations for example):

const transaction = await Moralis.transfer(options)
const result = await transaction.wait()

Moralis.onXXX events have changed

Instead of returning the results from the provider directly, moralis generalizes these events so that they can be used for anny connector: metamask, walletconnect, network etc. A notable change is the renamning of Moralis.onAccountsChanged to Moralis.onAccountChanged

Customize enableWeb3 / custom connectors

Previously, it was possible to overwrite the enableWeb3() function. This allowed for custom implementation to connect wallets that are not supported by Moralis out-of-the-box. This approach is not possible anymore, to allow for better scaling and more consistent behavior.

Instead, now you can implement your own connector, which extends the AbstractConnector class.

This class should implement

  • An activate() function that resolves to an object with:
    • provider: A valid EIP-1193 provider
    • chainId (optional): the chain that is being connected to (in hex)
    • account (optional): the account of the user that is being connected
  • Subscribes to the EIP-1193 events. This should be mostly done automatically by calling this.subscribeToEvents(provider) in the activate function.
  • the type field to indicate a name for the connector
  • (optionally) a deactivate function that extends the default deactivate function. Implement this when you need to clean up data/subscriptions upon ending/switching the connection.

Then you can include this CustomConnector in the authenticate/enableWeb3 call as an option:

Moralis.authenticate({ connector: CustomConnector })

See for example implementations:

0.0.184 (2022-01-13)

  • prevent loading issue when unpkg is down (#192) (4d0f787)

0.0.183 (2022-01-05)

Bug Fixes

  • debug (c426bd7)
  • set correct version during compiling (5723a14)
  • update sdk-check to account for beta branches (077c3f9)

0.0.182 (2022-01-04)

Bug Fixes

  • re-add default decimals value of 18 for fromWei (f127ab2)

0.0.181 (2022-01-03)

Bug Fixes

  • update CDN build version correctly (c3e3044)

0.0.180 (2022-01-03)

Bug Fixes

  • update build version correctly (3ba6a19)

0.0.179 (2022-01-03)

Bug Fixes

  • avoid floating decimals in utils (0a1de0a)

0.0.178 (2021-12-30)

Bug Fixes

0.0.177 (2021-12-30)

Bug Fixes

  • prevent floating error on Moralis.Units.Token (2704e5b)

0.0.176 (2021-12-30)

Bug Fixes

  • web3api type for 201 response (5ad68bb)

Moralis-SDK-JS

0.0.53

Features

  • Initial move from private repository