Repository navigation
fix: add proper tx.signAndSend - #123
Conversation
|
Indeed! Maybe we should add a call to |
You mean just to demonstrate? It's not needed and seems like overkill in this situation. And I DO think we should show the most common use-case. But maybe we could add it somewhere else! Do you want to open an issue more fully explaining your vision, @tupui? |
|
@chadoh Your PR fails checks, FYI. You might want to rebase on the latest |
111f5de to
fc45e99
Compare
|
@tupui @zachfedor @pselle this is passing the build and ready for review! Please read the git commits and provide feedback. My approach to fixing the build may be controversial. |
9534cdd to
301da09
Compare
|
I'm cool with this approach (checking in guess_the_number things so they're in git for stub/building purposes), left some comments basically asking for more comments to be added, and perhaps don't add the nft and fungible packages since you don't need them for the purpose of your goals |
There was a problem hiding this comment.
I think I dislike the idea of the stubbed out contract client files.
Scaffold Init now builds the clients, runs npm i, and then runs git init and adds a first commit. So wouldn't a user see immediate changes via git status because the client stub was removed and the real one generated?
EDIT: A bigger problem, now that I'm working in the project, is that any attempt to run scaffold while working in it will modify the checked in stubs and cause extra noise in git output. Not to mention how easy it'll be to accidentally commit the built versions and we'll keep having to revert them to the stub.
|
@zachfedor the init now running
|
The frontend was not actually signing and sending the transaction. Now it is. to do: - [ ] `WalletButton` is not getting updated with new balance without page refresh, despite `updateBalance` call
- remove `useWalletBalance` hook
- add `balances` and `updateBalances` to `useWallet`
- `balances` is a map so we can `balances?.xlm?.balance ?? '-'`
- simplify & improve `useWallet`
- `signTransaction` defined top-level, always included in props
- `[state, setState]` removed in favor of flatter & easier-to-reason-about
state variables such as `[address, setAddress]`
- modify stub in src/contracts/guess_the_number.ts to include all
GuessTheNumber contract methods
Now when you guess a number, your wallet balance in the top bar updates
as expected, and working with wallet balances feels much more
straightforward.
fixup
301da09 to
b49e0b3
Compare
|
@zachfedor @pselle this should be good-to-go now! |

The frontend was not actually signing and sending the transaction. Now it is.
to do:
WalletButtonis not getting updated with new balance without page refresh, despiteupdateBalancecall