satoshiportal / bullbitcoin-mobile Goto Github PK
View Code? Open in Web Editor NEWThe Bull Bitcoin Mobile Wallet and Exchange App
License: MIT License
The Bull Bitcoin Mobile Wallet and Exchange App
License: MIT License
The "tap to test backup" link on the homepage should open to the backup view, instead of wallet settings.
When user first installs the app, we should create two wallets for him:
The wallets will have no passphrase
The wallet label for mainnet will be set as "Bull Wallet"
The wallet label for testnet will be set as "Bull Testnet Wallet"
I don't see any reason why we shouldn't have the same mnemonic seed for both Mainnet and Testnet
Current status
Right now, the user is presented with a "create new wallet" button on the wallet homepage. This button would then be removed, the first load of the homepage would display the mainnet wallet.
Import the following testnet wallet and attempt send:
disorder exile ranch list pitch view base lobster jaguar riot tobacco festival
The fingerprint for public and private wallet matches however we get an Invalid Key error.
Recover a wallet with menmonic words breaks on wallet selection page.
Importing still works and imports a segwit wallet. Seems like a bug introduced during the past 24 hours.
Any kind of preview methods should use newAddress.peek() rather than newAddress.new() since new() increments the index in bdk.
If new() is being used, the address must be saved in the wallets Addresses so that when a new wallet is created the previewed address is included.
Currently, when a coldcard is imported for example, the preview before import shows the correct first address but once the wallet is loaded, it starts generating addresses from an incremented index.
If you copy extended public key from wallet settings and quickly close the window, an exception is thrown in debug and user is taken back home.
FlutterError (setState() called after dispose(): _TextSectionState#4be29(lifecycle state: defunct, not mounted)
This error happens if you call setState() on a State object for a widget that no longer appears in the widget tree (e.g., whose parent widget no longer includes the widget in its build). This error can occur when code calls setState() from a timer or an animation callback.
I don't there there is really a need to have a BIP21 description that is different from a private label, when receiving payments.
So when we are creating a BIP21 invoice and if the user has entered a description, we can use that description as the private label. If anything, the user can always edit the label later. This will remove one extra step of adding a private label which may be confusing and also it will ensure that everyone that creates a BIP21 description has a private label.
For imported wallets, if the format is ypub or zpub, do propose the address type selection page. We already know that zpub = segwit and ypub = legacy script.
A task-switcher function on mobile devices shows a screenshot of the app's most recent state. However, this snapshot can reveal private data. The secure_application package is made to prevent on-demand viewing of application material.
Include secure application constructor(SecureGate) is directly inside the MaterialApp by using its builder, above your app navigator.
Clicking on a received transaction, shows sender's change address.
v 0.1.2
Android
Wallet label is default set to the master fingerprint and the case should be consistent
, either all caps
or all lowercase
.
UI Overflow on tx page
Add a check to ensure that the first address generated by the wallet matches the one in the coldcard file.
This will guarantee that the same wallet exported is the one being imported.
Broadcasting a signed psbt breaks without any error message.
When in the send screen, let user switch from SATS to BTC to PREFERRED CURRENCY (fiat)
When switching to preferred currency, show available balance in preferred currency.
The input amount should be in preferred currency.
In the background, we convert the input amount in the preferred currency (fiat) to Bitcoin.
We keep the "send confirmation" screen as is.
When using the coin selection option, selecting a UTXO will change the send amount (amount required).
The send amount should not change when doing coin selection unless the "send full balance" option is also activated.
If the "send full balance" option is activated at the same time as coins are selected, the amount sent will be the amount of the coins selected. But if the "send full balance" option is not selected, the amount sent is the amount that is input by the user, we do not choose the amount to send, the user chooses it.
Test Backup button not aligned.
Ensure that when send transaction item is built, it has vins and vouts set correctly.
Ensure that when receive transaction item is built, it has vouts set correctly.
When creating an unsigned PSBT from a watch-only wallet, the tx builder seems to be trying to add the recipient address as one of the inputs. The end result is that a Coldcard is not able to sign the unsigned PSBT with the error message "Signing failed late. Path (m/84'/0'/0'/0/3) let to the wrong pubkey for input#0). I used a brand new coldcard wallet for this so the path should probably have been (m/84'/0'/0'/0/0). Not exactly sure what is going on, but definitely a bug here in the way the wallet is crafting the unsigned transaction.
final appDocDir = await getApplicationDocumentsDirectory();
final String dbDir = appDocDir.path + '/${wallet.getWalletStorageString()}';
The following directories have to be deleted otherwise the bdk wallet will continue to exist.
When making an outbound transaction, the change address utxo must inherit the label of the outbound transaction.
We know which utxo is the change utxo (supplied automatically by txbuilder) by the fact that it is not the recipient's address that was input by the user.
Currently not working as of 0.1.2
Build Transaction shows 0 sats as Amount to Send
Cannot change Transaction label
In version 0.1.3 the test backup function was removed from wallet settings when the test has been completed.
We can use the following design:
Logic: a user may want to test the backup multiple times, not just one time.
Attempt to import the following extended pubkey with origin:
[42073c3f/84'/1'/0']tpubD6NzVbkrYhZ4WjQdye2sENVnUnx41NWiaiNJ7Z6TbdEhDJ8hVf5xMVCPYdYg2JFmChTtr2pSg1jYpuoEzR2jFjnRNFi8NLBMLjLA7Fu6d53
Unable to move past wallet selection page.
This update will complete change the way we are handling labeling.
Here are some notes from our discussions to help us start with implementation:
New label model:
enum BIP329Type { tx, address, pubkey, input, output, xpub }
const factory Bip329Label({
required BIP329Type type,
required String ref,
String? label,
String? origin,
bool? spendable,
})
label can be a comma separated list of labels allowing one ref to have many labels. Refs can also share labels.
Wallets now have two additional fields:
Wallet...
List<String>? labelTags,
List<Bip329Label>? bip329Labels,
labelTags contains all the existing labels used in a wallet. When a new label is being added to a particular bip329 ref, we will show the existing labelTags as dropdown to easily add an existing label. This will work similar to github issues labels or tags in most platforms like soundcloud.
We will need a helper function to find all related refs and they will by default inherit the same label.
Currently, the app allows the user to create a new wallet but will automatically generate a new mnemonic for this wallet.
We should add a new wallet creation flow which takes an existing wallet's mnemonic and creates a new wallet with that mnemonic and a passphrase.
The flow should be as follows:
Add the app version at the bottom of the settings page, to help users debug and to know if a new version is available.
Coldcard PSBT is not finalised and I assume it is because it leaves a .psbt that can be finalised by another role within the psbt flow. This makes sense in case of script psbts.
The .txn file is ready to use for broadcasting.
Will have to confirm this is the case with coldcard.
If this is the case, for users to be able to use a .psbt file we will have to be able to finalise a psbt - a requirement from bdk-flutter.
use enableIMEPersonalizedLearning: false for keyboard when typing seed so that mnemonic words are not logged by GBoard.
Not sure about the equivalent on ios. Wasnt able to find it with a simple google search.
This is required when doing a wallet recovery.
Steps to produce error
We should avoid using the fingerprint as wallet label as much as possible because it is a confusing UX.
Default wallet name = Bull Wallet
Default testnet wallet name = Bull Wallet Testnet
Coldcard import = Coldcard
Other imported wallets = Imported Wallet
New wallets and recovered wallets can keep the wallet fingerprint as wallet name for now.
Now that we have a dedicated Seed model from which many Wallets can be derived, we can introduce the KeyManager/KeyChain that we had discussed.
It would have:
Additionally:
Other notes on behaviour:
Optional features:
Imported Xpub and CC wallets do not have the option in their settings to show descriptors.
Translate errors from bdk into pleb friendly messages.
The main elements of the Error enum can be matched like an error code, however the message strings can vary within a single variant as well.
For example: Generic(String) - will be a matched type generic but the string could be a variety of different messages which have to be matched by their exact content. This can get tricky if bdk changes these strings.
So this 100% needs to have a test to ensure that we are always matching the strings correctly, especially when we update bdk-flutter. This will also help us keep all bitcoin specific error states well documented.
Downloading an unsigned PSBT doesn't work. Should be opening file directory so the user can save it directly onto a Cold Card virtual disk.
After importing a new wallet or recovering a wallet using a backup, automatically trigger a wallet sync.
Pricer api fails on some calls and throws an exception that isnt handled properly.
replicate receive cubit loadAddress in the walletsettings cubit so that addresses view can also loadAddresses into the wallet.
currently only recieve loads Addresses.
Change address must inherit label form outgoing transaction.
New receive transaction must inherit label from our deposit address.
Addresses linked to a transaction must update if a transaction label is updated.
All items to have multiple comma separated labels.
Typing amount to send in CAD input is broken because of formatter.
Few bugs and nits regarding recover wallet flow:
Wallet is not created properly. Currently there is no wallet data shown and I am not able to trigger a sync by dragging down the screen. I assume there is an error with how the wallets descriptor is being constructed. Fix should display the synced wallet data (balance and txs) from previous step on returning home.
If a wrong word is used the Recover button stops working even if the spelling of the word is corrected. To reproduce, type in a correct seed and change the spelling of one, click Recover, correct the spelling and click Recover again.
If a user goes back after typing words (while 3 potential wallet types are loading) - app freezes - possible something to do with the sync call made to load the potential wallets.
when a user types the words, help them finish it with filtered suggestions from the bip39 word list
Users are shows the seed in a different ordering to how they have to end up typing it for Recovery or Testing
Typing the seed correctly on first try alone works. However, after wallet is created and return to the Home Screen, there are a few more bugs:
How we display it for users to write:
1. word1 5. word5
2. word2 6. w6
3. w3 7. w7
4. w4 8. w8
How we display it for users to type:
1. word1 2. word2
3. word3 4. w4
5. w5 6. w6
7. w7 8. w8
Broadcast screen placeholder image says Scan Xpub
it should say Scan Tx
We need to add a "bump fee" flow which starts on a transactions' page if the wallet has made an outbound transaction what was RBF enabled.
The general ux flow is as follows:
If the transaction can be fee bumped then it returns a TxBuilder pre-populated with the inputs and outputs of the original transaction.
Returns an error if the transaction is already confirmed or doesn’t explicitly signal replace by fee (RBF).
We ask the user to select a feerate. We validate that the feerate of the bumped transaction fee is higher than the existing feerate. We can show the fee estimate module to help the user make a selection as to which feerate is appropriate.
We broadcast the new txid.
Important considerations
When doing a backup test, the "test backup" button is useless and is a remnant of the previous backup flow. We can remove that button.
There is a typo in the wallet type for Bull Bitcoin Wallet (no passphrase).
Currently says Bull Bitcoin Wallet (No passphase)
Should be Bull Bitcoin Wallet (no passphrase)
SAVE font is too large for button.
Save button does not give any feedback.
Label not shown in the Receive Page. This makes a labelled address look unlabelled.
Because the order of the words is reset automatically if the user makes a mistake, we don't need to have the "Reset Order" button.
When importing a seed that already exists, clicking Import does not display the Seed Exists
error.
final err = await walletSensRepository.newSeed(seed: seed!, secureStore: secureStorage);
if (err != null) {
emit(
state.copyWith(
errSavingWallet: err.toString(), // this is not displayed in the UI
savingWallet: false,
),
);
return;
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.