Flutter/mobile apps using the JSI backend will now route through the Rust implementations instead of falling back to JS. Same pattern as the x25519 fix.
This commit is contained in:
@@ -302,7 +302,7 @@ export function parseTransaction(data) {
|
||||
export function parseExtra(extraBytes) {
|
||||
// Try Rust backend first (faster, matches C++ behavior exactly)
|
||||
const bt = getCurrentBackendType();
|
||||
if (bt === 'ffi' || bt === 'wasm') {
|
||||
if (bt === 'ffi' || bt === 'wasm' || bt === 'jsi') {
|
||||
try {
|
||||
const backend = getCryptoBackend();
|
||||
if (backend.parseExtra) {
|
||||
|
||||
@@ -514,7 +514,7 @@ export function serializeGenInput(height) {
|
||||
export function serializeTxExtra(extra) {
|
||||
// Try Rust backend first (matches C++ behavior exactly)
|
||||
const bt = getCurrentBackendType();
|
||||
if (bt === 'ffi' || bt === 'wasm') {
|
||||
if (bt === 'ffi' || bt === 'wasm' || bt === 'jsi') {
|
||||
try {
|
||||
const backend = getCryptoBackend();
|
||||
if (backend.serializeTxExtra) {
|
||||
@@ -707,7 +707,7 @@ export function getTxPrefixHash(tx) {
|
||||
if (tx instanceof Uint8Array) {
|
||||
// Try Rust backend for raw bytes (pure keccak256, faster)
|
||||
const bt = getCurrentBackendType();
|
||||
if (bt === 'ffi' || bt === 'wasm') {
|
||||
if (bt === 'ffi' || bt === 'wasm' || bt === 'jsi') {
|
||||
try {
|
||||
const backend = getCryptoBackend();
|
||||
if (backend.computeTxPrefixHash) {
|
||||
|
||||
Reference in New Issue
Block a user