File tree Expand file tree Collapse file tree 3 files changed +25
-5
lines changed Expand file tree Collapse file tree 3 files changed +25
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
All notable changes to this project will be documented in this file.
4
4
5
+ ## [ 0.3.4] – 2022-11-17
6
+
7
+ - Improved error handling in case of network errors
8
+
5
9
## [ 0.3.3] – 2022-11-14
6
10
7
11
### Fix
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @eversdk/appkit" ,
3
- "version" : " 0.3.3 " ,
3
+ "version" : " 0.3.4 " ,
4
4
"description" : " FreeTON SDK: Application Kit" ,
5
5
"main" : " dist/index.js" ,
6
6
"types" : " dist/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -561,11 +561,27 @@ export class Account {
561
561
return boc ;
562
562
}
563
563
throw AccountError . missingBOC ( ) ;
564
- } catch ( error : any ) {
565
- if ( error . code === 603 ) {
566
- throw AccountError . missingBOC ( ) ;
564
+ } catch ( waitForError : any ) {
565
+ if ( waitForError . code === 603 ) {
566
+ try {
567
+ // Checking query
568
+ const { result } = await net . query_collection ( {
569
+ collection : "accounts" ,
570
+ filter : {
571
+ id : { eq : this . address } ,
572
+ } ,
573
+ result : "id" ,
574
+ } ) ;
575
+ if ( result . length === 0 ) {
576
+ throw AccountError . missingBOC ( ) ;
577
+ } else {
578
+ throw waitForError ;
579
+ }
580
+ } catch ( checkQueryError : any ) {
581
+ throw checkQueryError ;
582
+ }
567
583
}
568
- throw error
584
+ throw waitForError ;
569
585
}
570
586
}
571
587
You can’t perform that action at this time.
0 commit comments