File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -181,11 +181,12 @@ const extractEddsaSignature = (rawNearSignature: string): string => {
181181
182182let _getSignerCache = new Map < string , string > ( ) ;
183183export const getSigner = async ( chainId : string ) => {
184- const vmType = await getChain ( chainId ) . then ( ( c ) => c . vmType ) ;
185- if ( _getSignerCache . has ( vmType ) ) {
186- return _getSignerCache . get ( vmType ) ! ;
184+ if ( _getSignerCache . has ( chainId ) ) {
185+ return _getSignerCache . get ( chainId ) ! ;
187186 }
188187
188+ const vmType = await getChain ( chainId ) . then ( ( c ) => c . id ) ;
189+
189190 let domainId : number | undefined ;
190191 switch ( vmType ) {
191192 case "ethereum-vm" :
@@ -226,7 +227,7 @@ export const getSigner = async (chainId: string) => {
226227 case "ethereum-vm" :
227228 case "hyperliquid-vm" : {
228229 _getSignerCache . set (
229- vmType ,
230+ chainId ,
230231 publicKeyToAddress (
231232 `0x04${ Buffer . from ( bs58 . decode ( publicKey ) ) . toString ( "hex" ) } `
232233 ) . toLowerCase ( )
@@ -236,7 +237,7 @@ export const getSigner = async (chainId: string) => {
236237 }
237238
238239 case "solana-vm" : {
239- _getSignerCache . set ( vmType , publicKey ) ;
240+ _getSignerCache . set ( chainId , publicKey ) ;
240241
241242 break ;
242243 }
@@ -246,7 +247,7 @@ export const getSigner = async (chainId: string) => {
246247 }
247248 }
248249
249- return _getSignerCache . get ( vmType ) ! ;
250+ return _getSignerCache . get ( chainId ) ! ;
250251} ;
251252
252253export const getSignature = async ( id : string ) => {
You can’t perform that action at this time.
0 commit comments