@embarkai/ui-kit 0.4.78 → 0.4.79

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.
@@ -15,7 +15,7 @@
15
15
  <meta http-equiv="X-Content-Type-Options" content="nosniff" />
16
16
  <meta http-equiv="Referrer-Policy" content="strict-origin-when-cross-origin" />
17
17
 
18
- <title>EmbarkAI Secure Wallet - iframe version 0.4.78</title>
18
+ <title>EmbarkAI Secure Wallet - iframe version 0.4.79</title>
19
19
 
20
20
  <!-- Styles will be injected by build process -->
21
21
  <style>
@@ -6414,7 +6414,7 @@ var SigningManager = class extends TokenRefreshApiClient {
6414
6414
  };
6415
6415
 
6416
6416
  // src/iframe/main.ts
6417
- var IFRAME_VERSION = "0.4.78";
6417
+ var IFRAME_VERSION = "0.4.79";
6418
6418
  var IframeWallet = class {
6419
6419
  constructor() {
6420
6420
  __publicField(this, "messenger");
package/dist/index.cjs CHANGED
@@ -22168,14 +22168,7 @@ var init_onboarding_setup9 = __esm({
22168
22168
  elId: "sendmenu-page" /* sendMenu */,
22169
22169
  title: "passport:bridgeMenu.onboarding.bridgeMenu.title",
22170
22170
  description: "passport:bridgeMenu.onboarding.bridgeMenu.description",
22171
- waitSecs: 5,
22172
- onNext: () => {
22173
- const { setHyperRoute, setBridgeAssetSymbol, setOriginChain, setDestinationChain } = useBridgeStore.getState();
22174
- setHyperRoute("USDT/ethereum-lumiaprism");
22175
- setBridgeAssetSymbol("USDT");
22176
- setOriginChain("lumiaprism");
22177
- setDestinationChain("ethereum");
22178
- }
22171
+ waitSecs: 5
22179
22172
  },
22180
22173
  {
22181
22174
  elId: "bridgemenu-sender-wallet-selector" /* bridgeSenderWalletSelector */,
@@ -24706,32 +24699,44 @@ function useSendMenuParams() {
24706
24699
  (0, import_react85.useEffect)(() => {
24707
24700
  const { pageParams, setPageParams } = useLayoutDataStore.getState();
24708
24701
  if (!pageParams || !(0, import_lodash_es13.keys)(pageParams).length) return;
24709
- console.log("[SEND PARAMS]", pageParams);
24710
- const { sendFlow, asset, to, amount } = pageParams || {};
24702
+ const { sendFlow, send, bridge } = pageParams || {};
24711
24703
  const {
24712
24704
  setAmount: setSendAmount,
24713
24705
  setRecipient: setSendRecipient,
24714
24706
  setSelectedAsset: setSendSelectedAsset
24715
24707
  } = useSendStore.getState();
24716
- const { setAmount: setBridgeAmount } = useBridgeStore.getState();
24708
+ const {
24709
+ setAmount: setBridgeAmount,
24710
+ setHyperRoute: setBridgeHyperRoute,
24711
+ setOriginChain: setBridgeOriginChain,
24712
+ setDestinationChain: setBridgeDestinationChain,
24713
+ setRecipient: setBridgeRecipient
24714
+ } = useBridgeStore.getState();
24717
24715
  useFlowSelectorStore.getState().setFlow(sendFlow);
24718
24716
  switch (sendFlow) {
24719
24717
  //
24720
24718
  case "send":
24721
24719
  switch (true) {
24722
- case !!asset:
24723
- setSendAmount(String(amount));
24724
- case !!to:
24725
- setSendRecipient(to);
24726
- case !!amount:
24727
- setSendSelectedAsset(asset);
24720
+ case !!send.asset:
24721
+ setSendSelectedAsset(send.asset);
24722
+ case !!send.recipient:
24723
+ setSendRecipient(send.recipient);
24724
+ case !!send.amount:
24725
+ setSendAmount(String(send.amount));
24728
24726
  }
24729
24727
  break;
24730
24728
  //
24731
24729
  case "bridge":
24732
24730
  switch (true) {
24733
- case !!amount:
24734
- setBridgeAmount(String(amount));
24731
+ // shpuld be set together
24732
+ case (!!bridge.route && !!bridge.originChain && !!bridge.destinationChain):
24733
+ setBridgeHyperRoute(bridge.route);
24734
+ setBridgeOriginChain(bridge.originChain);
24735
+ setBridgeDestinationChain(bridge.destinationChain);
24736
+ case !!bridge.recipient:
24737
+ setBridgeRecipient(bridge.recipient);
24738
+ case !!bridge.amount:
24739
+ setTimeout(() => setBridgeAmount(bridge.amount), 100);
24735
24740
  }
24736
24741
  break;
24737
24742
  default:
@@ -26353,7 +26358,7 @@ var init_package = __esm({
26353
26358
  "package.json"() {
26354
26359
  package_default = {
26355
26360
  name: "@embarkai/ui-kit",
26356
- version: "0.4.78",
26361
+ version: "0.4.79",
26357
26362
  description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
26358
26363
  type: "module",
26359
26364
  main: "./dist/index.cjs",
package/dist/index.js CHANGED
@@ -22081,14 +22081,7 @@ var init_onboarding_setup9 = __esm({
22081
22081
  elId: "sendmenu-page" /* sendMenu */,
22082
22082
  title: "passport:bridgeMenu.onboarding.bridgeMenu.title",
22083
22083
  description: "passport:bridgeMenu.onboarding.bridgeMenu.description",
22084
- waitSecs: 5,
22085
- onNext: () => {
22086
- const { setHyperRoute, setBridgeAssetSymbol, setOriginChain, setDestinationChain } = useBridgeStore.getState();
22087
- setHyperRoute("USDT/ethereum-lumiaprism");
22088
- setBridgeAssetSymbol("USDT");
22089
- setOriginChain("lumiaprism");
22090
- setDestinationChain("ethereum");
22091
- }
22084
+ waitSecs: 5
22092
22085
  },
22093
22086
  {
22094
22087
  elId: "bridgemenu-sender-wallet-selector" /* bridgeSenderWalletSelector */,
@@ -24612,32 +24605,44 @@ function useSendMenuParams() {
24612
24605
  useEffect49(() => {
24613
24606
  const { pageParams, setPageParams } = useLayoutDataStore.getState();
24614
24607
  if (!pageParams || !keys2(pageParams).length) return;
24615
- console.log("[SEND PARAMS]", pageParams);
24616
- const { sendFlow, asset, to, amount } = pageParams || {};
24608
+ const { sendFlow, send, bridge } = pageParams || {};
24617
24609
  const {
24618
24610
  setAmount: setSendAmount,
24619
24611
  setRecipient: setSendRecipient,
24620
24612
  setSelectedAsset: setSendSelectedAsset
24621
24613
  } = useSendStore.getState();
24622
- const { setAmount: setBridgeAmount } = useBridgeStore.getState();
24614
+ const {
24615
+ setAmount: setBridgeAmount,
24616
+ setHyperRoute: setBridgeHyperRoute,
24617
+ setOriginChain: setBridgeOriginChain,
24618
+ setDestinationChain: setBridgeDestinationChain,
24619
+ setRecipient: setBridgeRecipient
24620
+ } = useBridgeStore.getState();
24623
24621
  useFlowSelectorStore.getState().setFlow(sendFlow);
24624
24622
  switch (sendFlow) {
24625
24623
  //
24626
24624
  case "send":
24627
24625
  switch (true) {
24628
- case !!asset:
24629
- setSendAmount(String(amount));
24630
- case !!to:
24631
- setSendRecipient(to);
24632
- case !!amount:
24633
- setSendSelectedAsset(asset);
24626
+ case !!send.asset:
24627
+ setSendSelectedAsset(send.asset);
24628
+ case !!send.recipient:
24629
+ setSendRecipient(send.recipient);
24630
+ case !!send.amount:
24631
+ setSendAmount(String(send.amount));
24634
24632
  }
24635
24633
  break;
24636
24634
  //
24637
24635
  case "bridge":
24638
24636
  switch (true) {
24639
- case !!amount:
24640
- setBridgeAmount(String(amount));
24637
+ // shpuld be set together
24638
+ case (!!bridge.route && !!bridge.originChain && !!bridge.destinationChain):
24639
+ setBridgeHyperRoute(bridge.route);
24640
+ setBridgeOriginChain(bridge.originChain);
24641
+ setBridgeDestinationChain(bridge.destinationChain);
24642
+ case !!bridge.recipient:
24643
+ setBridgeRecipient(bridge.recipient);
24644
+ case !!bridge.amount:
24645
+ setTimeout(() => setBridgeAmount(bridge.amount), 100);
24641
24646
  }
24642
24647
  break;
24643
24648
  default:
@@ -26259,7 +26264,7 @@ var init_package = __esm({
26259
26264
  "package.json"() {
26260
26265
  package_default = {
26261
26266
  name: "@embarkai/ui-kit",
26262
- version: "0.4.78",
26267
+ version: "0.4.79",
26263
26268
  description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
26264
26269
  type: "module",
26265
26270
  main: "./dist/index.cjs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embarkai/ui-kit",
3
- "version": "0.4.78",
3
+ "version": "0.4.79",
4
4
  "description": "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",