@shogun-sdk/swap 0.0.2-test.17 → 0.0.2-test.19

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/core.cjs CHANGED
@@ -553,13 +553,21 @@ async function handleEvmExecution({
553
553
  deadline,
554
554
  isSingleChain
555
555
  });
556
- console.log({ order });
557
556
  update("processing", messageFor("signing"));
558
557
  const { orderTypedData, nonce } = isSingleChain ? await (0, import_intents_sdk8.getEVMSingleChainOrderTypedData)(order) : await (0, import_intents_sdk8.getEVMCrossChainOrderTypedData)(order);
558
+ const typedData = serializeBigIntsToStrings(orderTypedData);
559
+ console.log({ order, orderTypedData: typedData });
559
560
  if (!wallet.signTypedData) {
560
561
  throw new Error("Wallet does not support EIP-712 signing");
561
562
  }
562
- const signature = await wallet.signTypedData(serializeBigIntsToStrings(orderTypedData));
563
+ const signature = await wallet.signTypedData({
564
+ domain: typedData.domain,
565
+ types: typedData.types,
566
+ primaryType: typedData.primaryType,
567
+ value: typedData.message,
568
+ // Preserve `message` for adapters that might still expect original viem shape.
569
+ message: typedData.message
570
+ });
563
571
  update("processing", messageFor("submitting"));
564
572
  const res = await order.sendToAuctioneer({ signature, nonce: nonce.toString() });
565
573
  if (!res.success) {
package/dist/core.js CHANGED
@@ -521,13 +521,21 @@ async function handleEvmExecution({
521
521
  deadline,
522
522
  isSingleChain
523
523
  });
524
- console.log({ order });
525
524
  update("processing", messageFor("signing"));
526
525
  const { orderTypedData, nonce } = isSingleChain ? await getEVMSingleChainOrderTypedData(order) : await getEVMCrossChainOrderTypedData(order);
526
+ const typedData = serializeBigIntsToStrings(orderTypedData);
527
+ console.log({ order, orderTypedData: typedData });
527
528
  if (!wallet.signTypedData) {
528
529
  throw new Error("Wallet does not support EIP-712 signing");
529
530
  }
530
- const signature = await wallet.signTypedData(serializeBigIntsToStrings(orderTypedData));
531
+ const signature = await wallet.signTypedData({
532
+ domain: typedData.domain,
533
+ types: typedData.types,
534
+ primaryType: typedData.primaryType,
535
+ value: typedData.message,
536
+ // Preserve `message` for adapters that might still expect original viem shape.
537
+ message: typedData.message
538
+ });
531
539
  update("processing", messageFor("submitting"));
532
540
  const res = await order.sendToAuctioneer({ signature, nonce: nonce.toString() });
533
541
  if (!res.success) {
package/dist/index.cjs CHANGED
@@ -637,13 +637,21 @@ async function handleEvmExecution({
637
637
  deadline,
638
638
  isSingleChain
639
639
  });
640
- console.log({ order });
641
640
  update("processing", messageFor("signing"));
642
641
  const { orderTypedData, nonce } = isSingleChain ? await (0, import_intents_sdk8.getEVMSingleChainOrderTypedData)(order) : await (0, import_intents_sdk8.getEVMCrossChainOrderTypedData)(order);
642
+ const typedData = serializeBigIntsToStrings(orderTypedData);
643
+ console.log({ order, orderTypedData: typedData });
643
644
  if (!wallet.signTypedData) {
644
645
  throw new Error("Wallet does not support EIP-712 signing");
645
646
  }
646
- const signature = await wallet.signTypedData(serializeBigIntsToStrings(orderTypedData));
647
+ const signature = await wallet.signTypedData({
648
+ domain: typedData.domain,
649
+ types: typedData.types,
650
+ primaryType: typedData.primaryType,
651
+ value: typedData.message,
652
+ // Preserve `message` for adapters that might still expect original viem shape.
653
+ message: typedData.message
654
+ });
647
655
  update("processing", messageFor("submitting"));
648
656
  const res = await order.sendToAuctioneer({ signature, nonce: nonce.toString() });
649
657
  if (!res.success) {
package/dist/index.js CHANGED
@@ -602,13 +602,21 @@ async function handleEvmExecution({
602
602
  deadline,
603
603
  isSingleChain
604
604
  });
605
- console.log({ order });
606
605
  update("processing", messageFor("signing"));
607
606
  const { orderTypedData, nonce } = isSingleChain ? await getEVMSingleChainOrderTypedData(order) : await getEVMCrossChainOrderTypedData(order);
607
+ const typedData = serializeBigIntsToStrings(orderTypedData);
608
+ console.log({ order, orderTypedData: typedData });
608
609
  if (!wallet.signTypedData) {
609
610
  throw new Error("Wallet does not support EIP-712 signing");
610
611
  }
611
- const signature = await wallet.signTypedData(serializeBigIntsToStrings(orderTypedData));
612
+ const signature = await wallet.signTypedData({
613
+ domain: typedData.domain,
614
+ types: typedData.types,
615
+ primaryType: typedData.primaryType,
616
+ value: typedData.message,
617
+ // Preserve `message` for adapters that might still expect original viem shape.
618
+ message: typedData.message
619
+ });
612
620
  update("processing", messageFor("submitting"));
613
621
  const res = await order.sendToAuctioneer({ signature, nonce: nonce.toString() });
614
622
  if (!res.success) {
package/dist/react.cjs CHANGED
@@ -489,13 +489,21 @@ async function handleEvmExecution({
489
489
  deadline,
490
490
  isSingleChain
491
491
  });
492
- console.log({ order });
493
492
  update("processing", messageFor("signing"));
494
493
  const { orderTypedData, nonce } = isSingleChain ? await (0, import_intents_sdk6.getEVMSingleChainOrderTypedData)(order) : await (0, import_intents_sdk6.getEVMCrossChainOrderTypedData)(order);
494
+ const typedData = serializeBigIntsToStrings(orderTypedData);
495
+ console.log({ order, orderTypedData: typedData });
495
496
  if (!wallet.signTypedData) {
496
497
  throw new Error("Wallet does not support EIP-712 signing");
497
498
  }
498
- const signature = await wallet.signTypedData(serializeBigIntsToStrings(orderTypedData));
499
+ const signature = await wallet.signTypedData({
500
+ domain: typedData.domain,
501
+ types: typedData.types,
502
+ primaryType: typedData.primaryType,
503
+ value: typedData.message,
504
+ // Preserve `message` for adapters that might still expect original viem shape.
505
+ message: typedData.message
506
+ });
499
507
  update("processing", messageFor("submitting"));
500
508
  const res = await order.sendToAuctioneer({ signature, nonce: nonce.toString() });
501
509
  if (!res.success) {
package/dist/react.js CHANGED
@@ -464,13 +464,21 @@ async function handleEvmExecution({
464
464
  deadline,
465
465
  isSingleChain
466
466
  });
467
- console.log({ order });
468
467
  update("processing", messageFor("signing"));
469
468
  const { orderTypedData, nonce } = isSingleChain ? await getEVMSingleChainOrderTypedData(order) : await getEVMCrossChainOrderTypedData(order);
469
+ const typedData = serializeBigIntsToStrings(orderTypedData);
470
+ console.log({ order, orderTypedData: typedData });
470
471
  if (!wallet.signTypedData) {
471
472
  throw new Error("Wallet does not support EIP-712 signing");
472
473
  }
473
- const signature = await wallet.signTypedData(serializeBigIntsToStrings(orderTypedData));
474
+ const signature = await wallet.signTypedData({
475
+ domain: typedData.domain,
476
+ types: typedData.types,
477
+ primaryType: typedData.primaryType,
478
+ value: typedData.message,
479
+ // Preserve `message` for adapters that might still expect original viem shape.
480
+ message: typedData.message
481
+ });
474
482
  update("processing", messageFor("submitting"));
475
483
  const res = await order.sendToAuctioneer({ signature, nonce: nonce.toString() });
476
484
  if (!res.success) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shogun-sdk/swap",
3
- "version": "0.0.2-test.17",
3
+ "version": "0.0.2-test.19",
4
4
  "type": "module",
5
5
  "description": "Shogun Network Swap utilities and helpers",
6
6
  "author": "Shogun Network",