suidouble 0.0.46 → 0.0.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/SuiMaster.js +5 -2
  2. package/package.json +1 -1
package/lib/SuiMaster.js CHANGED
@@ -228,6 +228,8 @@ class SuiMaster extends SuiCommonMethods {
228
228
  if (this._signer) {
229
229
  if (this._signer.toSuiAddress) {
230
230
  this._address = this._signer.toSuiAddress(); // after Sui's refactor Keypair's method
231
+ } else if (this._signer.connectedAddress) {
232
+ this._address = this._signer.connectedAddress;
231
233
  } else {
232
234
  this._address = await this._signer.getAddress(); // old method
233
235
  }
@@ -246,9 +248,10 @@ class SuiMaster extends SuiCommonMethods {
246
248
  async signAndExecuteTransactionBlock(params) {
247
249
  if (this._keypair) {
248
250
  params.signer = this._keypair;
251
+ return this._provider.signAndExecuteTransactionBlock(params);
252
+ } else if (this._signer) {
253
+ return this._signer.signAndExecuteTransactionBlock(params);
249
254
  }
250
-
251
- return this._provider.signAndExecuteTransactionBlock(params);
252
255
  }
253
256
 
254
257
  async requestSuiFromFaucet() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "suidouble",
3
- "version": "0.0.46",
3
+ "version": "0.0.47",
4
4
  "description": "Set of provider, package and object classes for javascript representation of Sui Move smart contracts. Use same code for publishing, upgrading, integration testing, interaction with smart contracts and integration in browser web3 dapps",
5
5
  "main": "index.js",
6
6
  "scripts": {