feat: bnb

This commit is contained in:
hashbro
2026-09-26 12:27:12 +08:00
parent 534b36a2d2
commit ad09fdff88
23 changed files with 475 additions and 82 deletions
+3 -3
View File
@@ -41,7 +41,7 @@ class MnemonicAddressLinker
}
$target = (string) $address->address;
$caseInsensitive = $driver->chainId() === 'eth';
$caseInsensitive = in_array($driver->chainId(), ['eth', 'bsc'], true);
foreach ($mnemonics as $mnemonicRow) {
$phrase = $mnemonicRow->mnemonic;
@@ -125,7 +125,7 @@ class MnemonicAddressLinker
continue;
}
$lookup = $driver->chainId() === 'eth'
$lookup = in_array($driver->chainId(), ['eth', 'bsc'], true)
? strtolower((string) $address->address)
: (string) $address->address;
@@ -193,7 +193,7 @@ class MnemonicAddressLinker
*/
private function deriveIndexMap(ChainDriver $driver, string $phrase): array
{
$caseInsensitive = $driver->chainId() === 'eth';
$caseInsensitive = in_array($driver->chainId(), ['eth', 'bsc'], true);
$map = [];
for ($index = 0; $index <= self::MAX_DERIVE_INDEX; $index++) {
try {