-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from ElrondNetwork/add-multiple-accounts-support
add support for multiple accounts / address indexes
- Loading branch information
Showing
22 changed files
with
461 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,3 +102,4 @@ matrix: | |
file: $TRAVIS_BUILD_DIR/testApp/cmd/testApp/$FILE_NAME | ||
skip_cleanup: true | ||
draft: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#include "utils.h" | ||
#include "os.h" | ||
#include "ux.h" | ||
#include "setAddress.h" | ||
|
||
// set the account and address index for the derivation path | ||
void handleSetAddress(uint8_t p1, uint8_t p2, uint8_t *dataBuffer, uint16_t dataLength, volatile unsigned int *flags, volatile unsigned int *tx) { | ||
UNUSED(p1); | ||
UNUSED(p2); | ||
|
||
if (dataLength != sizeof(uint32_t) * 2) { | ||
THROW(ERR_INVALID_ARGUMENTS); | ||
return; | ||
} | ||
|
||
uint32_t account, address_index; | ||
|
||
account = readUint32BE(dataBuffer); | ||
address_index = readUint32BE(dataBuffer + sizeof(uint32_t)); | ||
|
||
if ((account > __UINT8_MAX__) || (address_index > __UINT8_MAX__)) { | ||
THROW(ERR_INVALID_ARGUMENTS); | ||
return; | ||
} | ||
|
||
bip32_account = account; | ||
bip32_address_index = address_index; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#include "os.h" | ||
|
||
#ifndef _SET_ADDRESS_H_ | ||
#define _SET_ADDRESS_H_ | ||
|
||
void handleSetAddress(uint8_t p1, uint8_t p2, uint8_t *dataBuffer, uint16_t dataLength, volatile unsigned int *flags, volatile unsigned int *tx); | ||
|
||
#endif |
Oops, something went wrong.