Skip to content

chore: updated develop-4.0 with changes from develop #842

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
10323a1
chore: readme update
JeneaVranceanu May 2, 2023
d7f5a95
chore: readme update #817
JeneaVranceanu May 2, 2023
c1d01d2
feat: sign without hash
Jun 7, 2023
c9e0edd
add default value
JuyeonYu Jun 8, 2023
2af0c71
Addresses generator (#1)
6od9i Jun 29, 2023
12b781f
- Grammar fixed
6od9i Jun 29, 2023
f30bd0e
- linter Trailing Whitespace Violation fixed
6od9i Jun 29, 2023
9e9e48d
- closure style updated
6od9i Jun 29, 2023
755ed95
- not used code removed
6od9i Jun 29, 2023
7876390
- Trailing Whitespace fixed in tests
6od9i Jun 29, 2023
d76e6ee
fix: createNewAccount always non-hardened derivation
JeneaVranceanu Jun 30, 2023
a9ed5cd
Merge branch 'develop' into develop-6od9i
JeneaVranceanu Jun 30, 2023
b82e347
Merge pull request #2 from JeneaVranceanu/develop-6od9i
6od9i Jun 30, 2023
216f11b
- bug with original pathAppendix fixed
6od9i Jun 30, 2023
a64e380
chore: refactoring of createNewCustomChildAccount
JeneaVranceanu Jun 30, 2023
9c68d9b
- Test testAddressGeneration modified with hardcoded addresses
6od9i Jun 30, 2023
886897c
chore: merged with develop
JeneaVranceanu Jun 30, 2023
91975f6
fix: trimming / only if it's present as a prefix; using let for 'newP…
JeneaVranceanu Jun 30, 2023
ccae14f
Merge branch 'develop' of https://github.com/6od9i/web3swift into dev…
JeneaVranceanu Jun 30, 2023
97def7b
fix: used short notation for null checking
JeneaVranceanu Jun 30, 2023
e806518
Merge pull request #3 from JeneaVranceanu/develop-6od9i
6od9i Jun 30, 2023
752171b
chore: trailing closure style for compactMap
JeneaVranceanu Jul 1, 2023
dd32c16
- linter warning fixed
6od9i Jul 3, 2023
e587175
- isHardened check removed from createNewCustomChildAccount
6od9i Jul 5, 2023
4833b1c
Merge pull request #825 from 6od9i/develop
yaroslavyaroslav Jul 19, 2023
dab2667
Merge pull request #824 from JuyeonYu/noHashInSign
yaroslavyaroslav Jul 24, 2023
7719379
feat: enable encode Event and IETH.getLogs
zhangliugang Aug 24, 2023
909a1b0
remove a force unwrap
zhangliugang Aug 24, 2023
df87030
Trim Trailing Whitespace
zhangliugang Aug 24, 2023
89a9863
add more test for encodeTopic
zhangliugang Aug 28, 2023
d744289
encodeTopic bytes should accept hex string
zhangliugang Sep 2, 2023
2d4bffd
Merge pull request #830 from zhangliugang/query-fileter
JeneaVranceanu Sep 20, 2023
bab86ca
refactor: random bytes generation; data and string extensions update …
pharms-eth Nov 7, 2023
6177c46
Merge branch 'develop' into develop-4.0
JeneaVranceanu Jan 16, 2024
ed830e6
Merge branch 'develop' into develop-4.0
JeneaVranceanu Jan 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
- Test testAddressGeneration modified with hardcoded addresses
  • Loading branch information
6od9i committed Jun 30, 2023
commit 9c68d9b47f7ae2d88954328647850ab20c67b6fc
13 changes: 11 additions & 2 deletions Tests/web3swiftTests/localTests/BIP32KeystoreTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import Web3Core

class BIP32KeystoreTests: XCTestCase {
func testAddressGeneration() throws {
/// Arrange
/// Seed randomly generated for this test
let mnemonic = "resource beyond merit enemy foot piece reveal eagle nothing luggage goose spot"
let password = "test_password"
Expand All @@ -29,10 +30,9 @@ class BIP32KeystoreTests: XCTestCase {
throw NSError(domain: "0", code: 0)
}

/// Act
let addresses = try keystore.getAddressForAccount(password: password,
number: addressesCount)
XCTAssertEqual(UInt(addresses.count), addressesCount)
XCTAssertNotEqual(addresses[11], addresses[1])

guard let sameKeystore = try BIP32Keystore(
mnemonics: mnemonic,
Expand All @@ -48,6 +48,15 @@ class BIP32KeystoreTests: XCTestCase {
try sameKeystore.createNewCustomChildAccount(password: password,
path: HDNode.defaultPathMetamaskPrefix + "/\(walletNumber)")
let address = sameKeystore.addresses?.last?.address

/// Assert
XCTAssertEqual(UInt(addresses.count), addressesCount)
XCTAssertNotEqual(addresses[11], addresses[1])
XCTAssertEqual(addresses.last?.address, address)
XCTAssertEqual("0xEF22ebb8Bb5CDa4EaCc98b280c94Cbaa3828566F", addresses.last?.address)
XCTAssertEqual("0xdc69CBFE39c46B104875DF9602dFdCDB9b862a16", addresses.first?.address)
XCTAssertEqual("0xdc69CBFE39c46B104875DF9602dFdCDB9b862a16", sameKeystore.addresses?.first?.address)
XCTAssertEqual("0x971CF293b46162CD03DD9Cc39E89B592988DD6C4", addresses[Int(addressesCount / 2)].address)
XCTAssertEqual("0x3B565482a93CE4adA9dE0fD3c118bd41E24CC23C", addresses[10].address)
}
}