Skip to content

Conversation

@Szymon20000
Copy link
Contributor

Description

Ticket: [CP-]

Please provide:

  • A summary of the changes
  • Motivation and context for this change
  • Any dependencies introduced
  • (If breaking) migration steps and instructions

Screenshots/Videos

Include relevant screenshots or screen recordings of iOS and Android.

Testing

Dev Testing (if applicable)

  • Provide steps to test the happy path of your feature
  • Provide steps to test edge cases and error states
  • Trigger a build on bitrise and reference it here
  • Move the ticket into the "Testing" column on Jira

QA Testing (if applicable)

  • Provide instructions for QA to test this feature thoroughly
  • State expected behavior / acceptance criteria

Checklist

Please check all that apply (if applicable)

  • I have performed a self-review of my code
  • I have verified the code works
  • I have included screenshots / videos of android and ios
  • I have added testing steps
  • I have added/updated necessary unit tests
  • I have updated the documentation

index 018d7051a57a2250c738e018ba8e1518d1b9525a..e89a135c10edc50174315c5cf0a3c9871fe65e6a 100644
--- a/android/src/main/java/com/gantix/JailMonkey/JailMonkeyModule.java
+++ b/android/src/main/java/com/gantix/JailMonkey/JailMonkeyModule.java
@@ -74,11 +74,7 @@ public class JailMonkeyModule extends ReactContextBaseJavaModule {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this patch is already in the other pr I believe

--- a/dist/index.cjs.js
+++ b/dist/index.cjs.js
@@ -1,10 +1,32 @@
-"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Zt=require("detect-browser"),U=require("@walletconnect/time"),P=require("@walletconnect/window-getters"),Xt=require("@walletconnect/window-metadata"),en=require("query-string"),Te=require("@ethersproject/hash"),tn=require("@ethersproject/transactions"),Ae=require("@stablelib/chacha20poly1305"),nn=require("@stablelib/hkdf"),B=require("@stablelib/random"),H=require("@stablelib/sha256"),rn=require("@stablelib/x25519"),p=require("uint8arrays"),on=require("elliptic"),sn=require("@walletconnect/relay-auth"),an=require("@walletconnect/relay-api");function Ie(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if(n!=="default"){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var J=Ie(en),Pe=Ie(rn);const W=":";function ne(e){const[t,n]=e.split(W);return{namespace:t,reference:n}}function Ce(e){const{namespace:t,reference:n}=e;return[t,n].join(W)}function re(e){const[t,n,r]=e.split(W);return{namespace:t,reference:n,address:r}}function $e(e){const{namespace:t,reference:n,address:r}=e;return[t,n,r].join(W)}function oe(e,t){const n=[];return e.forEach(r=>{const o=t(r);n.includes(o)||n.push(o)}),n}function je(e){const{address:t}=re(e);return t}function _e(e){const{namespace:t,reference:n}=re(e);return Ce({namespace:t,reference:n})}function cn(e,t){const{namespace:n,reference:r}=ne(t);return $e({namespace:n,reference:r,address:e})}function un(e){return oe(e,je)}function Ue(e){return oe(e,_e)}function ln(e,t=[]){const n=[];return Object.keys(e).forEach(r=>{if(t.length&&!t.includes(r))return;const o=e[r];n.push(...o.accounts)}),n}function dn(e,t=[]){const n=[];return Object.keys(e).forEach(r=>{if(t.length&&!t.includes(r))return;const o=e[r];n.push(...Ue(o.accounts))}),n}function pn(e,t=[]){const n=[];return Object.keys(e).forEach(r=>{if(t.length&&!t.includes(r))return;const o=e[r];n.push(...z(r,o))}),n}function z(e,t){return e.includes(":")?[e]:t.chains||[]}var fn=Object.defineProperty,De=Object.getOwnPropertySymbols,mn=Object.prototype.hasOwnProperty,gn=Object.prototype.propertyIsEnumerable,Ve=(e,t,n)=>t in e?fn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ke=(e,t)=>{for(var n in t||(t={}))mn.call(t,n)&&Ve(e,n,t[n]);if(De)for(var n of De(t))gn.call(t,n)&&Ve(e,n,t[n]);return e};const xe="ReactNative",y={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},Y=" ",hn=":",Me="/",se=2,yn=1e3,Fe="js";function ie(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function D(){return!P.getDocument()&&!!P.getNavigator()&&navigator.product===xe}function M(){return!ie()&&!!P.getNavigator()&&!!P.getDocument()}function C(){return D()?y.reactNative:ie()?y.node:M()?y.browser:y.unknown}function vn(){var e;try{return D()&&typeof global<"u"&&typeof(global==null?void 0:global.Application)<"u"?(e=global.Application)==null?void 0:e.applicationId:void 0}catch{return}}function Le(e,t){let n=J.parse(e);return n=ke(ke({},n),t),e=J.stringify(n),e}function En(){return Xt.getWindowMetadata()||{name:"",description:"",url:"",icons:[""]}}function bn(e,t){var n;const r=C(),o={protocol:e,version:t,env:r};return r==="browser"&&(o.host=((n=P.getLocation())==null?void 0:n.host)||"unknown"),o}function Ke(){if(C()===y.reactNative&&typeof global<"u"&&typeof(global==null?void 0:global.Platform)<"u"){const{OS:n,Version:r}=global.Platform;return[n,r].join("-")}const e=Zt.detect();if(e===null)return"unknown";const t=e.os?e.os.replace(" ","").toLowerCase():"unknown";return e.type==="browser"?[t,e.name,e.version].join("-"):[t,e.version].join("-")}function qe(){var e;const t=C();return t===y.browser?[t,((e=P.getLocation())==null?void 0:e.host)||"unknown"].join(":"):t}function Be(e,t,n){const r=Ke(),o=qe();return[[e,t].join("-"),[Fe,n].join("-"),r,o].join("/")}function Nn({protocol:e,version:t,relayUrl:n,sdkVersion:r,auth:o,projectId:s,useOnCloseEvent:i,bundleId:u}){const l=n.split("?"),a=Be(e,t,r),d={auth:o,ua:a,projectId:s,useOnCloseEvent:i||void 0,origin:u||void 0},c=Le(l[1]||"",d);return l[0]+"?"+c}function On(e){let t=(e.match(/^[^:]+(?=:\/\/)/gi)||[])[0];const n=typeof t<"u"?e.split("://")[1]:e;return t=t==="wss"?"https":"http",[t,n].join("://")}function Sn(e,t,n){if(!e[t]||typeof e[t]!==n)throw new Error(`Missing or invalid "${t}" param`)}function He(e,t=se){return Je(e.split(Me),t)}function wn(e){return He(e).join(Y)}function w(e,t){return e.filter(n=>t.includes(n)).length===e.length}function Je(e,t=se){return e.slice(Math.max(e.length-t,0))}function Rn(e){return Object.fromEntries(e.entries())}function Tn(e){return new Map(Object.entries(e))}function An(e,t){const n={};return Object.keys(e).forEach(r=>{n[r]=t(e[r])}),n}const In=e=>e;function We(e){return e.trim().replace(/^\w/,t=>t.toUpperCase())}function Pn(e){return e.split(Y).map(t=>We(t)).join(Y)}function Cn(e=U.FIVE_MINUTES,t){const n=U.toMiliseconds(e||U.FIVE_MINUTES);let r,o,s;return{resolve:i=>{s&&r&&(clearTimeout(s),r(i))},reject:i=>{s&&o&&(clearTimeout(s),o(i))},done:()=>new Promise((i,u)=>{s=setTimeout(()=>{u(new Error(t))},n),r=i,o=u})}}function $n(e,t,n){return new Promise(async(r,o)=>{const s=setTimeout(()=>o(new Error(n)),t);try{const i=await e;r(i)}catch(i){o(i)}clearTimeout(s)})}function ae(e,t){if(typeof t=="string"&&t.startsWith(`${e}:`))return t;if(e.toLowerCase()==="topic"){if(typeof t!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}else if(e.toLowerCase()==="id"){if(typeof t!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${e}`)}function jn(e){return ae("topic",e)}function _n(e){return ae("id",e)}function Un(e){const[t,n]=e.split(":"),r={id:void 0,topic:void 0};if(t==="topic"&&typeof n=="string")r.topic=n;else if(t==="id"&&Number.isInteger(Number(n)))r.id=Number(n);else throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${n}`);return r}function Dn(e,t){return U.fromMiliseconds((t||Date.now())+U.toMiliseconds(e))}function Vn(e){return Date.now()>=U.toMiliseconds(e)}function kn(e,t){return`${e}${t?`:${t}`:""}`}function O(e=[],t=[]){return[...new Set([...e,...t])]}async function xn({id:e,topic:t,wcDeepLink:n}){var r;try{if(!n)return;const o=typeof n=="string"?JSON.parse(n):n,s=o?.href;if(typeof s!="string")return;const i=ze(s,e,t),u=C();if(u===y.browser){if(!((r=P.getDocument())!=null&&r.hasFocus())){console.warn("Document does not have focus, skipping deeplink.");return}i.startsWith("https://")||i.startsWith("http://")?window.open(i,"_blank","noreferrer noopener"):window.open(i,Ye()?"_blank":"_self","noreferrer noopener")}else u===y.reactNative&&typeof(global==null?void 0:global.Linking)<"u"&&await global.Linking.openURL(i)}catch(o){console.error(o)}}function ze(e,t,n){const r=`requestId=${t}&sessionTopic=${n}`;e.endsWith("/")&&(e=e.slice(0,-1));let o=`${e}`;if(e.startsWith("https://t.me")){const s=e.includes("?")?"&startapp=":"?startapp=";o=`${o}${s}${Ge(r,!0)}`}else o=`${o}/wc?${r}`;return o}async function Mn(e,t){let n="";try{if(M()&&(n=localStorage.getItem(t),n))return n;n=await e.getItem(t)}catch(r){console.error(r)}return n}function ce(e,t){return e.filter(n=>t.includes(n))}function Fn(e,t){if(!e.includes(t))return null;const n=e.split(/([&,?,=])/),r=n.indexOf(t);return n[r+2]}function Ln(){return typeof crypto<"u"&&crypto!=null&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/gu,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function Kn(){return typeof process<"u"&&process.env.IS_VITEST==="true"}function Ye(){return typeof window<"u"&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto)}function Ge(e,t=!1){const n=Buffer.from(e).toString("base64");return t?n.replace(/[=]/g,""):n}function ue(e){return Buffer.from(e,"base64").toString("utf-8")}const qn="https://rpc.walletconnect.org/v1";async function Qe(e,t,n,r,o,s){switch(n.t){case"eip191":return Ze(e,t,n.s);case"eip1271":return await Xe(e,t,n.s,r,o,s);default:throw new Error(`verifySignature failed: Attempted to verify CacaoSignature with unknown type: ${n.t}`)}}function Ze(e,t,n){return tn.recoverAddress(Te.hashMessage(t),n).toLowerCase()===e.toLowerCase()}async function Xe(e,t,n,r,o,s){const i=ne(r);if(!i.namespace||!i.reference)throw new Error(`isValidEip1271Signature failed: chainId must be in CAIP-2 format, received: ${r}`);try{const u="0x1626ba7e",l="0000000000000000000000000000000000000000000000000000000000000040",a="0000000000000000000000000000000000000000000000000000000000000041",d=n.substring(2),c=Te.hashMessage(t).substring(2),f=u+c+l+a+d,h=await fetch(`${s||qn}/?chainId=${r}&projectId=${o}`,{method:"POST",body:JSON.stringify({id:Bn(),jsonrpc:"2.0",method:"eth_call",params:[{to:e,data:f},"latest"]})}),{result:m}=await h.json();return m?m.slice(0,u.length).toLowerCase()===u.toLowerCase():!1}catch(u){return console.error("isValidEip1271Signature: ",u),!1}}function Bn(){return Date.now()+Math.floor(Math.random()*1e3)}var Hn=Object.defineProperty,Jn=Object.defineProperties,Wn=Object.getOwnPropertyDescriptors,et=Object.getOwnPropertySymbols,zn=Object.prototype.hasOwnProperty,Yn=Object.prototype.propertyIsEnumerable,tt=(e,t,n)=>t in e?Hn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,le=(e,t)=>{for(var n in t||(t={}))zn.call(t,n)&&tt(e,n,t[n]);if(et)for(var n of et(t))Yn.call(t,n)&&tt(e,n,t[n]);return e},nt=(e,t)=>Jn(e,Wn(t));const Gn="did:pkh:",G=e=>e?.split(":"),rt=e=>{const t=e&&G(e);if(t)return e.includes(Gn)?t[3]:t[1]},ot=e=>{const t=e&&G(e);if(t)return t[2]+":"+t[3]},de=e=>{const t=e&&G(e);if(t)return t.pop()};async function Qn(e){const{cacao:t,projectId:n}=e,{s:r,p:o}=t,s=st(o,o.iss),i=de(o.iss);return await Qe(i,s,r,ot(o.iss),n)}const st=(e,t)=>{const n=`${e.domain} wants you to sign in with your Ethereum account:`,r=de(t);if(!e.aud&&!e.uri)throw new Error("Either `aud` or `uri` is required to construct the message");let o=e.statement||void 0;const s=`URI: ${e.aud||e.uri}`,i=`Version: ${e.version}`,u=`Chain ID: ${rt(t)}`,l=`Nonce: ${e.nonce}`,a=`Issued At: ${e.iat}`,d=e.exp?`Expiration Time: ${e.exp}`:void 0,c=e.nbf?`Not Before: ${e.nbf}`:void 0,f=e.requestId?`Request ID: ${e.requestId}`:void 0,h=e.resources?`Resources:${e.resources.map(g=>`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you share more about what exact changes you did for these wallet connect packages? are there forked repos for these changes? just asking so we could maintain it going forward.

@Szymon20000 Szymon20000 marked this pull request as draft October 27, 2025 17:02
stash work
@Szymon20000 Szymon20000 marked this pull request as ready for review October 30, 2025 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants