Skip to content

Commit

Permalink
Merge pull request #163 from argentlabs/fix/mobile-adapter-errors
Browse files Browse the repository at this point in the history
fix: throw error from `requestWallet` if caught error has `message` prop
  • Loading branch information
Cussone authored Dec 10, 2024
2 parents 2d9fa60 + f71158a commit db55a98
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/connectors/argentMobile/modal/starknet/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,12 @@ export class StarknetAdapter
const response = await this.client.request({ topic, chainId, request })
argentModal.closeModal("animateSuccess")
return response
} catch (error) {
} catch (error: any) {
argentModal.closeModal()
if (error instanceof Error) {
if (error instanceof Error || (error && error.message !== undefined)) {
throw new Error(error.message)
}
throw new Error("Unknow error on requestWallet")
throw new Error("Unknown error on requestWallet")
}
}

Expand Down

0 comments on commit db55a98

Please sign in to comment.