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:
Matt Hess
2026-02-13 16:55:46 +00:00
parent 1b9e8b6e64
commit 46f1cf5119
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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) {
+2 -2
View File
@@ -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) {