File tree 3 files changed +25
-18
lines changed
packages/hot-wallet/src/lib
3 files changed +25
-18
lines changed Original file line number Diff line number Diff line change 94
94
"@angular/platform-browser-dynamic" : " 16.1.9" ,
95
95
"@angular/router" : " 16.1.9" ,
96
96
"@here-wallet/core" : " 3.4.0" ,
97
- "@hot-wallet/sdk" : " 1.0.7 " ,
97
+ "@hot-wallet/sdk" : " 1.0.8 " ,
98
98
"@jscutlery/semver" : " 5.3.1" ,
99
99
"@ledgerhq/hw-transport" : " 6.30.3" ,
100
100
"@ledgerhq/hw-transport-webhid" : " 6.29.4" ,
Original file line number Diff line number Diff line change @@ -94,25 +94,32 @@ export function setupHotWallet(): WalletModuleFactory<InjectedWallet> {
94
94
} ,
95
95
96
96
async signAndSendTransaction ( params ) {
97
- const { transaction } = await HOT . request (
98
- "near:signAndSendTransaction" ,
99
- params
97
+ const receiverId =
98
+ params . receiverId || config . store . getState ( ) . contract ?. contractId ;
99
+
100
+ const { transactions } = await HOT . request (
101
+ "near:signAndSendTransactions" ,
102
+ {
103
+ transactions : [
104
+ {
105
+ actions : params . actions ,
106
+ signerId : params . signerId ,
107
+ receiverId : receiverId || "" ,
108
+ } ,
109
+ ] ,
110
+ }
100
111
) ;
101
112
102
- return transaction as any ;
113
+ return transactions [ 0 ] as any ;
103
114
} ,
104
115
105
116
async signAndSendTransactions ( params ) {
106
- const results : Array < string > = [ ] ;
107
- for ( const tx of params . transactions ) {
108
- const { transaction } = await HOT . request (
109
- "near:signAndSendTransaction" ,
110
- tx
111
- ) ;
112
- results . push ( transaction ) ;
113
- }
117
+ const { transactions } = await HOT . request (
118
+ "near:signAndSendTransactions" ,
119
+ params
120
+ ) ;
114
121
115
- return results as Array < any > ;
122
+ return transactions as Array < any > ;
116
123
} ,
117
124
118
125
async verifyOwner ( ) {
Original file line number Diff line number Diff line change 3310
3310
sha1 "^1.1.1"
3311
3311
uuid4 "2.0.3"
3312
3312
3313
- "@hot-wallet/sdk@1.0.7 ":
3314
- version "1.0.7 "
3315
- resolved "https://registry.yarnpkg.com/@hot-wallet/sdk/-/sdk-1.0.7 .tgz#d57e6e13e1a79189410a6a8373b5c9919a6abff3 "
3316
- integrity sha512-atFCg7w50II4y9FIIvbJmPT2lZ0AeCHy/MY1q5da3tXQdpc6vv3qG4XQwlh2hpegDiixvRi1hATuHpy163INHg ==
3313
+ "@hot-wallet/sdk@1.0.8 ":
3314
+ version "1.0.8 "
3315
+ resolved "https://registry.yarnpkg.com/@hot-wallet/sdk/-/sdk-1.0.8 .tgz#52b959af64363f7fc30b2b0300cb2dc5763ecc3d "
3316
+ integrity sha512-HPS/y8NNhT9mUw1xLYQUlENn1F8NULqNYAiy25idGGreGJUbSEiHmCPVed7MSJbxEAli+b4GnhbNmirfhA12og ==
3317
3317
dependencies:
3318
3318
"@near-js/crypto" "^1.4.0"
3319
3319
"@near-js/utils" "^1.0.0"
You can’t perform that action at this time.
0 commit comments