@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.cjs +9 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2026,11 +2026,17 @@ var METAMASK_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 318.6 3
|
|
|
2026
2026
|
<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"/>
|
|
2027
2027
|
<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"/>
|
|
2028
2028
|
</svg>`;
|
|
2029
|
+
var TRUST_WALLET_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 480 480" fill="none">
|
|
2030
|
+
<rect width="480" height="480" rx="96" fill="#0500FF"/>
|
|
2031
|
+
<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"/>
|
|
2032
|
+
</svg>`;
|
|
2029
2033
|
var BASE_LOGO = svgToDataUri(BASE_SVG);
|
|
2030
2034
|
var METAMASK_LOGO = svgToDataUri(METAMASK_SVG);
|
|
2035
|
+
var TRUST_WALLET_LOGO = svgToDataUri(TRUST_WALLET_SVG);
|
|
2031
2036
|
var KNOWN_LOGOS = {
|
|
2032
2037
|
metamask: METAMASK_LOGO,
|
|
2033
|
-
base: BASE_LOGO
|
|
2038
|
+
base: BASE_LOGO,
|
|
2039
|
+
"trust wallet": TRUST_WALLET_LOGO
|
|
2034
2040
|
};
|
|
2035
2041
|
function SourceCard({ name, address, verified, onChangeSource }) {
|
|
2036
2042
|
const { tokens } = useSwypeConfig();
|
|
@@ -4610,8 +4616,9 @@ function SwypePaymentInner({
|
|
|
4610
4616
|
const activeOtpStatus = verificationTarget?.kind === "email" ? emailLoginState.status : verificationTarget?.kind === "phone" ? smsLoginState.status : "initial";
|
|
4611
4617
|
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;
|
|
4612
4618
|
react.useEffect(() => {
|
|
4619
|
+
if (authenticated) return;
|
|
4613
4620
|
if (activeOtpErrorMessage) setError(activeOtpErrorMessage);
|
|
4614
|
-
}, [activeOtpErrorMessage]);
|
|
4621
|
+
}, [activeOtpErrorMessage, authenticated]);
|
|
4615
4622
|
const handleSendLoginCode = react.useCallback(async () => {
|
|
4616
4623
|
const normalizedIdentifier = normalizeAuthIdentifier(authInput);
|
|
4617
4624
|
if (!normalizedIdentifier) {
|