File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @waves/signer" ,
3- "version" : " 1.0.4 " ,
3+ "version" : " 1.0.6 " ,
44 "main" : " dist/cjs/index.js" ,
55 "module" : " dist/es/index.js" ,
66 "types" : " dist/cjs/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -299,6 +299,8 @@ export class Signer {
299299 */
300300 @ensureProvider
301301 public async login ( ) : Promise < UserData > {
302+ await this . _connectPromise ;
303+
302304 try {
303305 this . _userData = await this . currentProvider ! . login ( ) ;
304306
@@ -323,6 +325,8 @@ export class Signer {
323325 */
324326 @ensureProvider
325327 public async logout ( ) : Promise < void > {
328+ await this . _connectPromise ;
329+
326330 try {
327331 await this . currentProvider ! . logout ( ) ;
328332
@@ -340,6 +344,7 @@ export class Signer {
340344 * Подписываем сообщение пользователя (провайдер может устанавливать префикс)
341345 * @param message
342346 */
347+ @ensureProvider
343348 public signMessage ( message : string | number ) : Promise < string > {
344349 return this . _connectPromise . then ( ( provider ) =>
345350 provider . signMessage ( message )
@@ -350,6 +355,7 @@ export class Signer {
350355 * Подписываем типизированные данные
351356 * @param data
352357 */
358+ @ensureProvider
353359 public signTypedData ( data : Array < TypedData > ) : Promise < string > {
354360 return this . _connectPromise . then ( ( provider ) =>
355361 provider . signTypedData ( data )
You can’t perform that action at this time.
0 commit comments