@depay/web3-wallets-evm 18.0.10 → 18.1.0

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.
package/dist/esm/index.js CHANGED
@@ -224,7 +224,7 @@ const submitSimpleTransfer$3 = async ({ transaction, wallet })=> {
224
224
  let fromPubkey = new PublicKey(await wallet.account());
225
225
  let toPubkey = new PublicKey(transaction.to);
226
226
  const provider = await getProvider(transaction.blockchain);
227
- let recentBlockhash = (await provider.getLatestBlockhash()).blockhash;
227
+ let { blockhash, lastValidBlockHeight } = await provider.getLatestBlockhash();
228
228
  const instructions = [
229
229
  SystemProgram.transfer({
230
230
  fromPubkey,
@@ -234,20 +234,21 @@ const submitSimpleTransfer$3 = async ({ transaction, wallet })=> {
234
234
  ];
235
235
  const messageV0 = new TransactionMessage({
236
236
  payerKey: fromPubkey,
237
- recentBlockhash,
237
+ recentBlockhash: blockhash,
238
238
  instructions,
239
239
  }).compileToV0Message();
240
240
  const transactionV0 = new VersionedTransaction(messageV0);
241
+ transaction._lastValidBlockHeight = lastValidBlockHeight;
241
242
  return wallet._sendTransaction(transactionV0)
242
243
  };
243
244
 
244
245
  const submitInstructions = async ({ transaction, wallet })=> {
245
246
  let fromPubkey = new PublicKey(await wallet.account());
246
247
  const provider = await getProvider(transaction.blockchain);
247
- let recentBlockhash = (await provider.getLatestBlockhash()).blockhash;
248
+ let { blockhash, lastValidBlockHeight } = await provider.getLatestBlockhash();
248
249
  const messageV0 = new TransactionMessage({
249
250
  payerKey: fromPubkey,
250
- recentBlockhash,
251
+ recentBlockhash: blockhash,
251
252
  instructions: transaction.instructions,
252
253
  }).compileToV0Message(
253
254
  transaction.alts ? await Promise.all(transaction.alts.map(async(alt)=>{
@@ -257,6 +258,7 @@ const submitInstructions = async ({ transaction, wallet })=> {
257
258
  if(transaction.signers && transaction.signers.length) {
258
259
  transactionV0.sign(Array.from(new Set(transaction.signers)));
259
260
  }
261
+ transaction._lastValidBlockHeight = lastValidBlockHeight;
260
262
  return wallet._sendTransaction(transactionV0)
261
263
  };
262
264
 
@@ -222,7 +222,7 @@ const submitSimpleTransfer = async ({ transaction, wallet })=> {
222
222
  let fromPubkey = new PublicKey(await wallet.account());
223
223
  let toPubkey = new PublicKey(transaction.to);
224
224
  const provider = await getProvider(transaction.blockchain);
225
- let recentBlockhash = (await provider.getLatestBlockhash()).blockhash;
225
+ let { blockhash, lastValidBlockHeight } = await provider.getLatestBlockhash();
226
226
  const instructions = [
227
227
  SystemProgram.transfer({
228
228
  fromPubkey,
@@ -232,20 +232,21 @@ const submitSimpleTransfer = async ({ transaction, wallet })=> {
232
232
  ];
233
233
  const messageV0 = new TransactionMessage({
234
234
  payerKey: fromPubkey,
235
- recentBlockhash,
235
+ recentBlockhash: blockhash,
236
236
  instructions,
237
237
  }).compileToV0Message();
238
238
  const transactionV0 = new VersionedTransaction(messageV0);
239
+ transaction._lastValidBlockHeight = lastValidBlockHeight;
239
240
  return wallet._sendTransaction(transactionV0)
240
241
  };
241
242
 
242
243
  const submitInstructions = async ({ transaction, wallet })=> {
243
244
  let fromPubkey = new PublicKey(await wallet.account());
244
245
  const provider = await getProvider(transaction.blockchain);
245
- let recentBlockhash = (await provider.getLatestBlockhash()).blockhash;
246
+ let { blockhash, lastValidBlockHeight } = await provider.getLatestBlockhash();
246
247
  const messageV0 = new TransactionMessage({
247
248
  payerKey: fromPubkey,
248
- recentBlockhash,
249
+ recentBlockhash: blockhash,
249
250
  instructions: transaction.instructions,
250
251
  }).compileToV0Message(
251
252
  transaction.alts ? await Promise.all(transaction.alts.map(async(alt)=>{
@@ -255,6 +256,7 @@ const submitInstructions = async ({ transaction, wallet })=> {
255
256
  if(transaction.signers && transaction.signers.length) {
256
257
  transactionV0.sign(Array.from(new Set(transaction.signers)));
257
258
  }
259
+ transaction._lastValidBlockHeight = lastValidBlockHeight;
258
260
  return wallet._sendTransaction(transactionV0)
259
261
  };
260
262
 
package/dist/umd/index.js CHANGED
@@ -227,7 +227,7 @@
227
227
  let fromPubkey = new solanaWeb3_js.PublicKey(await wallet.account());
228
228
  let toPubkey = new solanaWeb3_js.PublicKey(transaction.to);
229
229
  const provider = await web3Client.getProvider(transaction.blockchain);
230
- let recentBlockhash = (await provider.getLatestBlockhash()).blockhash;
230
+ let { blockhash, lastValidBlockHeight } = await provider.getLatestBlockhash();
231
231
  const instructions = [
232
232
  solanaWeb3_js.SystemProgram.transfer({
233
233
  fromPubkey,
@@ -237,20 +237,21 @@
237
237
  ];
238
238
  const messageV0 = new solanaWeb3_js.TransactionMessage({
239
239
  payerKey: fromPubkey,
240
- recentBlockhash,
240
+ recentBlockhash: blockhash,
241
241
  instructions,
242
242
  }).compileToV0Message();
243
243
  const transactionV0 = new solanaWeb3_js.VersionedTransaction(messageV0);
244
+ transaction._lastValidBlockHeight = lastValidBlockHeight;
244
245
  return wallet._sendTransaction(transactionV0)
245
246
  };
246
247
 
247
248
  const submitInstructions = async ({ transaction, wallet })=> {
248
249
  let fromPubkey = new solanaWeb3_js.PublicKey(await wallet.account());
249
250
  const provider = await web3Client.getProvider(transaction.blockchain);
250
- let recentBlockhash = (await provider.getLatestBlockhash()).blockhash;
251
+ let { blockhash, lastValidBlockHeight } = await provider.getLatestBlockhash();
251
252
  const messageV0 = new solanaWeb3_js.TransactionMessage({
252
253
  payerKey: fromPubkey,
253
- recentBlockhash,
254
+ recentBlockhash: blockhash,
254
255
  instructions: transaction.instructions,
255
256
  }).compileToV0Message(
256
257
  transaction.alts ? await Promise.all(transaction.alts.map(async(alt)=>{
@@ -260,6 +261,7 @@
260
261
  if(transaction.signers && transaction.signers.length) {
261
262
  transactionV0.sign(Array.from(new Set(transaction.signers)));
262
263
  }
264
+ transaction._lastValidBlockHeight = lastValidBlockHeight;
263
265
  return wallet._sendTransaction(transactionV0)
264
266
  };
265
267
 
@@ -227,7 +227,7 @@
227
227
  let fromPubkey = new solanaWeb3_js.PublicKey(await wallet.account());
228
228
  let toPubkey = new solanaWeb3_js.PublicKey(transaction.to);
229
229
  const provider = await web3ClientSvm.getProvider(transaction.blockchain);
230
- let recentBlockhash = (await provider.getLatestBlockhash()).blockhash;
230
+ let { blockhash, lastValidBlockHeight } = await provider.getLatestBlockhash();
231
231
  const instructions = [
232
232
  solanaWeb3_js.SystemProgram.transfer({
233
233
  fromPubkey,
@@ -237,20 +237,21 @@
237
237
  ];
238
238
  const messageV0 = new solanaWeb3_js.TransactionMessage({
239
239
  payerKey: fromPubkey,
240
- recentBlockhash,
240
+ recentBlockhash: blockhash,
241
241
  instructions,
242
242
  }).compileToV0Message();
243
243
  const transactionV0 = new solanaWeb3_js.VersionedTransaction(messageV0);
244
+ transaction._lastValidBlockHeight = lastValidBlockHeight;
244
245
  return wallet._sendTransaction(transactionV0)
245
246
  };
246
247
 
247
248
  const submitInstructions = async ({ transaction, wallet })=> {
248
249
  let fromPubkey = new solanaWeb3_js.PublicKey(await wallet.account());
249
250
  const provider = await web3ClientSvm.getProvider(transaction.blockchain);
250
- let recentBlockhash = (await provider.getLatestBlockhash()).blockhash;
251
+ let { blockhash, lastValidBlockHeight } = await provider.getLatestBlockhash();
251
252
  const messageV0 = new solanaWeb3_js.TransactionMessage({
252
253
  payerKey: fromPubkey,
253
- recentBlockhash,
254
+ recentBlockhash: blockhash,
254
255
  instructions: transaction.instructions,
255
256
  }).compileToV0Message(
256
257
  transaction.alts ? await Promise.all(transaction.alts.map(async(alt)=>{
@@ -260,6 +261,7 @@
260
261
  if(transaction.signers && transaction.signers.length) {
261
262
  transactionV0.sign(Array.from(new Set(transaction.signers)));
262
263
  }
264
+ transaction._lastValidBlockHeight = lastValidBlockHeight;
263
265
  return wallet._sendTransaction(transactionV0)
264
266
  };
265
267
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@depay/web3-wallets-evm",
3
3
  "moduleName": "Web3Wallets",
4
- "version": "18.0.10",
4
+ "version": "18.1.0",
5
5
  "description": "One-Stop-Shop JavaScript library to integrate various web3 crypto wallets and multiple blockchains at once with a single interface.",
6
6
  "main": "dist/umd/index.evm.js",
7
7
  "module": "dist/esm/index.evm.js",