-
Notifications
You must be signed in to change notification settings - Fork 2
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
fix: required deposit fix when available storage is higher than needed #40
Merged
Conversation
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
kieranroneill
approved these changes
Jul 30, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
github-actions bot
pushed a commit
that referenced
this pull request
Jul 30, 2024
# [1.1.0-beta.3](v1.1.0-beta.2...v1.1.0-beta.3) (2024-07-30) ### Bug Fixes * required deposit fix when available storage is higher than needed ([#40](#40)) ([99f9e8d](99f9e8d))
🎉 This PR is included in version 1.1.0-beta.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
jaswinder6991
added a commit
that referenced
this pull request
Aug 19, 2024
* feat(wip): removed signer from viewMethods by dropping NAJ account.ViewFunction (#35) * feat(wip): removed signer from viewMethods by dropping accounts.ViewFunction * chore: fixed docs and removed comments * chore: fixed linting issues * fix: removed the use of Buffer as it won't work in browser environments * fix: put try/catch for btoa * chore(release): 1.1.0-beta.1 # [1.1.0-beta.1](v1.0.1...v1.1.0-beta.1) (2024-07-24) ### Features * **wip:** removed signer from viewMethods by dropping NAJ account.ViewFunction ([#35](#35)) ([a57edc4](a57edc4)) * feat: remove near-api-js account object dependency from change functions (#38) * refactor: remove dependency on near-api-js account and connection objects from change functions * test: update tests to use new network initialization * chore: squash * docs: amend docs to use new initailaization * docs: update docs to use the new signer object and fix broken links * build(lint): fix linting errors * chore: squash * refactor: convert signer to account because signer is icky * chore(release): 1.1.0-beta.2 # [1.1.0-beta.2](v1.1.0-beta.1...v1.1.0-beta.2) (2024-07-25) ### Features * remove near-api-js account object dependency from change functions ([#38](#38)) ([134e463](134e463)) * fix: required deposit fix when available storage is higher than needed (#40) * fix: required deposit fix when available storage is higher than needed * chore: fixed lint error * chore(release): 1.1.0-beta.3 # [1.1.0-beta.3](v1.1.0-beta.2...v1.1.0-beta.3) (2024-07-30) ### Bug Fixes * required deposit fix when available storage is higher than needed ([#40](#40)) ([99f9e8d](99f9e8d)) * feat: adding api server support for read methods (#33) * feat: adding api server support for read methods * feat(wip): added more args to get and introduced keys method * chore: fixed merge issues * feat: added index() function and docs for all api server changes * docs: fix docs build * chore(release): 1.1.0-beta.4 # [1.1.0-beta.4](v1.1.0-beta.3...v1.1.0-beta.4) (2024-08-01) ### Features * adding api server support for read methods ([#33](#33)) ([dc53b30](dc53b30)) * feat: aded transformActions utility and exposed all utils (#42) feat: added transformActions utility and exposed all utils * chore(release): 1.1.0-beta.5 # [1.1.0-beta.5](v1.1.0-beta.4...v1.1.0-beta.5) (2024-08-05) ### Features * aded transformActions utility and exposed all utils ([#42](#42)) ([bfc9072](bfc9072)) --------- Co-authored-by: nearbuilder <tech@nearbuilders.org> Co-authored-by: Kieran O'Neill <hello@kieranoneill.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When the available storage for on account is greater than the required storage for new data, we attach 0 deposit, hence making the transaction gas-only and also skipping the re-direction to the web wallet.
Gas-only transactions by limited access keys which are specific to apps and enable an experience where you don't have to open wallet every time to confirm a transaction is one of the important and attractive features of Near's account model.
This is also what makes usage on Near.social smoother.
This PR, removes the 1 yocto deposit for the above mentioned case and replace it with 0 deposit instead.
PS: I know total storage is never used in the requiredDeposit calculation but I still changed it cause it was factually incorrect, total storage can never be less than available storage.
Description
Type of change