@swype-org/react-sdk 0.1.71 → 0.1.73

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/index.js CHANGED
@@ -2023,11 +2023,17 @@ var METAMASK_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 318.6 3
2023
2023
  <polygon fill="#763D16" stroke="#763D16" stroke-linecap="round" stroke-linejoin="round" points="278.3,114.2 286.8,73.7 274.1,35.5 174.6,109.4 214.9,138.2 267.2,153.5 278.8,140 273.8,136.4 281.8,129.1 275.4,124.1 283.4,118"/>
2024
2024
  <polygon fill="#763D16" stroke="#763D16" stroke-linecap="round" stroke-linejoin="round" points="31.8,73.7 40.3,114.2 35.5,118 43.5,124.1 36.8,129.1 44.8,136.4 39.8,140 51.3,153.5 103.6,138.2 143.1,110.1 44.4,35.5"/>
2025
2025
  </svg>`;
2026
+ var TRUST_WALLET_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 480 480" fill="none">
2027
+ <rect width="480" height="480" rx="96" fill="#0500FF"/>
2028
+ <path d="M240 97C291.833 133.09 330.903 139.252 378 139.252C378 269.452 346.233 348.948 240 403C133.767 348.948 102 269.452 102 139.252C149.097 139.252 188.167 133.09 240 97Z" stroke="white" stroke-width="30" stroke-linecap="round" stroke-linejoin="round"/>
2029
+ </svg>`;
2026
2030
  var BASE_LOGO = svgToDataUri(BASE_SVG);
2027
2031
  var METAMASK_LOGO = svgToDataUri(METAMASK_SVG);
2032
+ var TRUST_WALLET_LOGO = svgToDataUri(TRUST_WALLET_SVG);
2028
2033
  var KNOWN_LOGOS = {
2029
2034
  metamask: METAMASK_LOGO,
2030
- base: BASE_LOGO
2035
+ base: BASE_LOGO,
2036
+ "trust wallet": TRUST_WALLET_LOGO
2031
2037
  };
2032
2038
  function SourceCard({ name, address, verified, onChangeSource }) {
2033
2039
  const { tokens } = useSwypeConfig();
@@ -4607,8 +4613,9 @@ function SwypePaymentInner({
4607
4613
  const activeOtpStatus = verificationTarget?.kind === "email" ? emailLoginState.status : verificationTarget?.kind === "phone" ? smsLoginState.status : "initial";
4608
4614
  const activeOtpErrorMessage = verificationTarget?.kind === "email" && emailLoginState.status === "error" ? emailLoginState.error?.message ?? "Failed to continue with email." : verificationTarget?.kind === "phone" && smsLoginState.status === "error" ? smsLoginState.error?.message ?? "Failed to continue with phone number." : null;
4609
4615
  useEffect(() => {
4616
+ if (authenticated) return;
4610
4617
  if (activeOtpErrorMessage) setError(activeOtpErrorMessage);
4611
- }, [activeOtpErrorMessage]);
4618
+ }, [activeOtpErrorMessage, authenticated]);
4612
4619
  const handleSendLoginCode = useCallback(async () => {
4613
4620
  const normalizedIdentifier = normalizeAuthIdentifier(authInput);
4614
4621
  if (!normalizedIdentifier) {