Skip to content

Commit 8564479

Browse files
committed
use bytewords_get_word from bytewords lib
1 parent 5649c1a commit 8564479

File tree

4 files changed

+4
-13
lines changed

4 files changed

+4
-13
lines changed

deps/bc-bytewords

seedtool/seed.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ class SSKRShareSeq {
125125
mutable int last_rv;
126126
};
127127

128-
String bytewords_get_word(uint8_t index);
129128

130129
/**
131130
* This function is taken from libwally. We cannot import libwally_bip39 because it is clashing with

seedtool/seed.ino

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -236,16 +236,6 @@ void SSKRShareSeq::del_share(size_t ndx) {
236236
nshares -= 1;
237237
}
238238

239-
240-
String bytewords_get_word(uint8_t index) {
241-
// FIXME bytewords are currently not exposed in the bytewords library. Once exposed, replace this function
242-
char word[5] = {0};
243-
static const char* bytewords = "ableacidalsoapexaquaarchatomauntawayaxisbackbaldbarnbeltbetabiasbluebodybragbrewbulbbuzzcalmcashcatschefcityclawcodecolacookcostcruxcurlcuspcyandarkdatadaysdelidicedietdoordowndrawdropdrumdulldutyeacheasyechoedgeepicevenexamexiteyesfactfairfernfigsfilmfishfizzflapflewfluxfoxyfreefrogfuelfundgalagamegeargemsgiftgirlglowgoodgraygrimgurugushgyrohalfhanghardhawkheathelphighhillholyhopehornhutsicedideaidleinchinkyintoirisironitemjadejazzjoinjoltjowljudojugsjumpjunkjurykeepkenokeptkeyskickkilnkingkitekiwiknoblamblavalazyleaflegsliarlistlimplionlogoloudloveluaulucklungmainmanymathmazememomenumeowmildmintmissmonknailnavyneednewsnextnoonnotenumbobeyoboeomitonyxopenovalowlspaidpartpeckplaypluspoempoolposepuffpumapurrquadquizraceramprealredorichroadrockroofrubyruinrunsrustsafesagascarsetssilkskewslotsoapsolosongstubsurfswantacotasktaxitenttiedtimetinytoiltombtoystriptunatwinuglyundouniturgeuservastveryvetovialvibeviewvisavoidvowswallwandwarmwaspwavewaxywebswhatwhenwhizwolfworkyankyawnyellyogayurtzapszestzinczonezoomzero";
244-
memcpy(word, &bytewords[index * 4], 4);
245-
word[4] = '\0';
246-
return String(word);
247-
}
248-
249239
BIP39Seq * BIP39Seq::from_words(uint16_t * words) {
250240
BIP39Seq * retval = new BIP39Seq();
251241
for (size_t ii = 0; ii < WORD_COUNT; ++ii)

seedtool/userinterface.ino

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1282,7 +1282,9 @@ struct WordListState {
12821282
struct SSKRWordlistState : WordListState {
12831283
SSKRWordlistState(int i_nwords) : WordListState(i_nwords, 1024) {}
12841284
virtual String refword(int ndx) {
1285-
return String(bytewords_get_word(ndx));
1285+
char wrd[5];
1286+
bytewords_get_word(ndx, wrd);
1287+
return String(wrd);
12861288
}
12871289
};
12881290

0 commit comments

Comments
 (0)