@tuwaio/pulsar-core 0.6.10 → 0.6.11

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/README.md +14 -7
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -261,6 +261,7 @@ export async function getHistory(params?: {
261
261
 
262
262
  import { createBoundedUseStore, createPulsarStore, createTxInMemoryStore } from '@tuwaio/pulsar-core';
263
263
  import { pulsarEvmAdapter } from '@tuwaio/pulsar-evm';
264
+ import { useSiwxSessionStore } from '@tuwaio/siwx-react';
264
265
 
265
266
  import { appChains, config } from '@/configs/wagmiConfig';
266
267
  import { getHistory, syncTransaction } from '@/app/actions';
@@ -284,7 +285,8 @@ const initialStore = createPulsarStore<TransactionUnion>({
284
285
  name: storageName,
285
286
  adapter: [pulsarEvmAdapter(config, appChains)],
286
287
  onRemoteCreate: async (tx) => {
287
- await syncTransaction(tx);
288
+ const auth = useSiwxSessionStore.getState().session;
289
+ await syncTransaction(tx, auth);
288
290
  },
289
291
  });
290
292
 
@@ -292,15 +294,20 @@ export const usePulsarStore = createBoundedUseStore(initialStore);
292
294
 
293
295
  const pulsarInMemoryStore = createTxInMemoryStore<TransactionUnion>({
294
296
  localTransactionsPool: initialStore.getState().transactionsPool,
297
+ reconcileUnsyncedTransactions: initialStore.getState().reconcileUnsyncedTransactions,
295
298
 
296
299
  getHistory: async ({ page, walletAddress }) => {
297
300
  try {
298
- const history = await getHistory({
299
- walletAddress,
300
- page,
301
- limit: 10,
302
- appName: 'Example App',
303
- });
301
+ const auth = useSiwxSessionStore.getState().session;
302
+ const history = await getHistory(
303
+ {
304
+ walletAddress,
305
+ page,
306
+ limit: 10,
307
+ appName: 'Example App',
308
+ },
309
+ auth,
310
+ );
304
311
 
305
312
  if (!history) {
306
313
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuwaio/pulsar-core",
3
- "version": "0.6.10",
3
+ "version": "0.6.11",
4
4
  "private": false,
5
5
  "author": "Oleksandr Tkach",
6
6
  "license": "Apache-2.0",
@@ -49,7 +49,7 @@
49
49
  "devDependencies": {
50
50
  "@tuwaio/orbit-core": "^0.2.15",
51
51
  "dayjs": "^1.11.21",
52
- "immer": "^11.1.15",
52
+ "immer": "^11.1.16",
53
53
  "tsup": "^8.5.1",
54
54
  "typescript": "^6.0.3",
55
55
  "vitest": "^4.1.10",