giseldo/neodataset huggingface dataset:
Built backend RPC calls to check whether a user CAN exit from SKALE given community pool balance

We need to check this function is available on our contract - MAY require an update of ABI and redeploy to latest rinkeby contracts. Useful tools to test at the bottom

2 paths forward to evaluate

### Build out our own TX encoder 

Check if the below code works for all dynamic params, if it does, we can probably use it - would need to support types other than string though.

```
   public function encodeContractMethod($contractMethodDeclaration, array $params)
    {
        // Method Signature: first 4 bytes (8 hex digits)
        $contractMethodSignature = substr($this->sha3($contractMethodDeclaration), 0, 8);

        $contractMethodParameters = '';

        foreach ($params as $param) {
            if (is_array($param)) {
                if ($param['type'] === 'string') {
                    // first part of encoding - encoding the offset to the param
                    $offset = strlen($contractMethodParameters);
                    $offsetHex = dechex($offset);
                    $encodedOffsetSection = str_pad($offsetHex, 64, '0', STR_PAD_LEFT);
                    $contractMethodParameters .= $encodedOffsetSection;
                    
                    $paramLength = strlen($param['value']);
                    $paramLengthHex = dechex($paramLength);
                    $encodedParamLengthSection = str_pad($paramLengthHex, 64, '0', STR_PAD_LEFT);
                    $contractMethodParameters .= $encodedParamLengthSection;
                    
                    $parameterHex = bin2hex($param['value']);
                    $paramSection = str_pad($parameterHex, 64, '0', STR_PAD_RIGHT);
                    $contractMethodParameters .= $paramSection;

                    $x = 1;
                }
            } else {
                if (strpos($param, '0x') !== 0) {
                    throw new \Exception('Ethereum::call only supports raw hex parameters');
                }

                $hex = substr($param, 2);
                $contractMethodParameters .= str_pad($hex, 64, '0', STR_PAD_LEFT);    
            }
        }

        return '0x' . $contractMethodSignature . $contractMethodParameters;
    }
```

### Alternatively, if there are issues with the above
 
Let's make an alternative eth_call encoding mechanism that delegates function encoding to MW3


## Resources

- manually encoding https://docs.soliditylang.org/en/v0.8.10/abi-spec.html#formal-specification-of-the-encoding
- param encoder for checking output we get is correct https://abi.hashex.org - example or params that should work
  - function checkUserBalance
  - Bytes32 0x466ec1d61bcefaf41e5b6330da699b497d1f90c0fdd6f40f321efd02252fb6b3
  - Address 0xb4Ea99EA800E5f59fBA5e342aA3a1A07cB59A074

![image](/uploads/751857d5dbaa29e4680ef617cf37df7e/image.png)

- Alchemy for manually trying data params

Story points: 20.0
"Switch to app" overlay overlaps Guest Mode banner

Given the user is on a mobile device (here: emulating iOS),
and the user visits the new Guest Mode homepage,
when the page is loaded,
then a "Switch to the app" overlay appears at the bottom of the screen.

Desired outcome:

Remove the Guest Mode banner from mobile and display only the "Switch to app" overlay

![image](/uploads/82cbacbc600e85c5b7fb2f7d0ec1fb35/image.png)

Story points: 1.0
Round down onchain transfer amounts

<!---
Please read this!

Before opening a new issue, make sure to search for keywords in the issues
filtered by the "T - Bug" label and verify the issue you're about to submit isn't a duplicate.
--->

### Summary

Onchain transfer amounts are not rounded down enough, leading to some layout-breaking amounts. 

### Steps to reproduce

1. Login to an account that has made withdrawals, ideally for amounts with many decimal points. If not you can probably edit the DOM to achieve the same effect. 
2. Go to https://www.minds.com/wallet/tokens/transfers
3. See unrounded token amounts

### Platform information 

Replicated Firefox / Ubuntu, likely browser agnostic web.

### What is the current *bug* behavior?

Token amounts aren't rounded down

### What is the expected *correct* behavior?

Should be rounded down.. maybe to 3 decimal places

### Relevant logs and/or screenshots

![image](/uploads/fa0a8a59467f209783699c82e7601ab2/image.png)

### Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Story points: 1.0
Refined toasters UI for Web

See below revised toaster notifications for web:

Revised Designs:
- https://www.sketch.com/s/0e2af34e-d059-44c2-8e50-6ed1e341ba3f/v/pxxYWr/a/928587/r/00WPzj

# Notes
- [ ] When displayed, the toaster should slide up as shown below.
- [ ] When the cursor is placed over the toaster, it should persist, and not auto hide (this may already be the case).
- [ ] For QA: Please provide examples of how to test each view.

![notification](/uploads/9fd4eef8b15aab91e2bcd35c7b8b9c15/notification.gif)

Story points: 2.0
Clicking Minds logo displays "Oops! We couldn't load this page"

## Issue
- As a registered Minds user,
- given I'm logged in on the **staging** website,
- and viewing any page within the app,
- when I click the the Minds logo in the top-left,
- then I see a "Oops! We couldn’t load this page." message.

![image](/uploads/88bf43bb4e5c3205ccdf9bd111f400ba/image.png)

## Expected result

- then I see the news feed.

Story points: 1.0
Login / Join Minds Now buttons visuals don't match designs

Login/Register buttons at the top-right should match the designs.

In staging:

![image](/uploads/67350f44aee0242b32912d8b5bfac60c/image.png)

Design mock:

![image](/uploads/ae3e5699c4672a55f7d59a387b95fcee/image.png)

Story points: 1.0
Subscribe to network changes

Network changes should be subscribed to avoid situations where the user messes up the UI by manually switching networks in Metamask rather than using the on-site switcher. - We may need to re-initialize the wallet (reset and initialize) when this happens.

We need to ensure there are no provider conflicts, and our site is aware of changes to the current network in the provider - network changes should be subscribable through code such as below:

```
const provider = new ethers.providers.Web3Provider(window.ethereum, "any");
    provider.on("network", (newNetwork, oldNetwork) => {
        // When a Provider makes its initial connection, it emits a "network"
        // event with a null oldNetwork along with the newNetwork. So, if the
        // oldNetwork exists, it represents a changing network
        if (oldNetwork) {
           // handle - reload or update UI
        }
    });
```

When doing this we need to ensure that onsite network switches are not picked up in the above logic.

We should investigate also whether we can use the current browser provider as the sole way to change the local state's network variable, rather than having to track it in a separate variable locally and update it as we go.

Story points: 8.0
Subscribers page not displaying

<!---
Please read this!

Before opening a new issue, make sure to search for keywords in the issues
filtered by the "T - Bug" label and verify the issue you're about to submit isn't a duplicate.
--->

### Summary

(Summarize the bug encountered concisely)

### Steps to reproduce

(How one can reproduce the issue - this is very important)

### Platform information 

(Browser, device, system stats, screen size)

### What is the current *bug* behavior?

(What actually happens)

### What is the expected *correct* behavior?

(What you should see instead)

### Relevant logs and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's very hard to read otherwise.)

### Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Story points: 2.0
[GAT-MDS-3-37] unable to disable group notification

Component:
Groups

Steps to reproduce:
open website >> navigate to menu tabs 
click on groups >> click on discover groups 
scroll through the list and open any group 
tap on the settings icon located below the group cover photo
click on disable notifications  

Severity:
Medium

Attachments:
https://tracker.testerwork.com/video_files/d082af673f235a4154d9f385aead32d63662d9a7226c0b8458f671176077c03ac49ea3428e703fe1d885a0a78392cb16

Test case id:


Country:


Description:
Actual results
After clicking on disable notifications, it can be noticed that the enable notifications status is not displayed when revisiting the group setting 

Expected results
 user is able to successfully disable notifications with the updated status showing enable notifications when revisiting the settings 



Environment:
platform_info: Windows 10
operating_system: -
mobile_device_name: -
web_browser_and_version: Windows | Chrome
operating_system_version: Windows 10

Browser:


Credentials:


Repro rate x5 1:

## Dev note

As the user is not a member, they won't be able to disable the notification. We should only show this option for members.

Story points: 2.0
[GAT-MDS-3-21] Unable to save tags under manage tags as "Save Tag" button is inaccessible under iOS safari

Component:
Discovery

Steps to reproduce:
Launch website 
Log in, if already not logged in 
Tap on discovery and go to settings 
Tap on manage tags
Scroll down and observe user is unable to save tags under manage tags as "Save Tag" button is inaccessible under iOS safari

Severity:
High

Attachments:
https://tracker.testerwork.com/video_files/fd0fbed2e03f40d0bb680dd5802d132de8e29b447c789eaedc0d68e53e203a700a5a6f51738a61c8f6583712753fa4ae

Test case id:


Country:


Description:
Actual results
It is observed that user is unable to save tags under manage tags as "Save Tag" button is inaccessible under iOS safari

Expected results
User should be able  to save tags under manage tags and "Save Tag" button should be accessible under iOS safari



Environment:
platform_info: Apple iPhone 7 Plus, iOS 15.0
operating_system: -
mobile_device_name: Apple iPhone 7 Plus
web_browser_and_version: iOS | Safari
operating_system_version: iOS 15.0

Browser:


Credentials:


Repro rate x5 1:

Story points: 2.0
[GAT-MDS-3-10] The text on Sub-menu options is cut off in Groups on Android Chrome

Component:
Groups

Steps to reproduce:
On Newsfeed select hamburger menu on the let
Scroll down and tap on groups
Tap on the three dots (kebab menu) next to the heading "Groups"

Severity:
Low

Attachments:
https://tracker.testerwork.com/image_files/74cfc589699cc2e724eceed5d29cf513d6737d026cc8a4bec38ec18b9f94cb17e4ff0332a67482f589c83b1b05053b41, https://tracker.testerwork.com/video_files/43c8a93f4fc74f6dcf266f8bd76d4c9f66915305dbe51d75d565cf7e9dda20c468bad38e141c53ff9105a66d6736cd67

Test case id:


Country:


Description:
Actual results
Observe that the options/text is cut off and the user cannot see the first letters of either option 

Expected results
The text should be properly and fully displayed 



Environment:
platform_info: Samsung Galaxy A12, Android 11.0 11
operating_system: -
mobile_device_name: Samsung Galaxy A12
web_browser_and_version: Android | Chrome
operating_system_version: Android 11.0 11

Browser:


Credentials:


Repro rate x5 1:

Story points: 2.0
Create chain swap modal accessed via wallet dropdown

* https://www.sketch.com/s/e4602509-7d4e-4c13-b21b-5e01370bc785/a/DPbDb4a
* https://www.sketch.com/s/e4602509-7d4e-4c13-b21b-5e01370bc785/a/v8JdEpe

___

* [x] May need to be re-opened on page reload if we have to do this when swapping networks.
* [x] Move existing prototype component into the modal.
* [x] Figure out how other L2s / Sidechains can tie into this flow.
* [x] Approve button is going to be needed unless other investigative task is fruitful.

Story points: 13.0
Build out chain agnostic network switcher

https://www.sketch.com/s/e4602509-7d4e-4c13-b21b-5e01370bc785/a/v8JdEpe

* [ ] Network switcher should be chain agnostic, and work with any network we want to allow
* [ ] Network swap choice should be restricted to a whitelist of networks we allow
* [ ] We should build out Metamask detection and only allow network swapping on Metamask initially.
* [ ] Explore whether we have to reload the page on network swapping. This is REALLY bad for UX but is an advised security practice. It may be possible to get around it by having STRICT checks at every access point to make sure users ARE on the correct network.
* [ ] Should update with the connected wallets' current network on load.

Story points: 3.0
Boost rotator slow / failed loading.

<!---
Please read this!

Before opening a new issue, make sure to search for keywords in the issues
filtered by the "T - Bug" label and verify the issue you're about to submit isn't a duplicate.
--->

### Summary

Sporadically the boost rotator appears to either load incredibly slowly, or not at all. The behavior varies from browser to browser.

### Steps to reproduce

* Load newsfeed (with boosts turned on, if you are Plus)

### Platform information 

* For me, Firefox consistantly has slow loading issues
* For John, Brave sometimes outright does not load the rotator.

### What is the current *bug* behavior?

Slow load / rotator not loading.

### What is the expected *correct* behavior?

Rotator should load smoothly with the rest of the inline boost feed. 

### Relevant logs and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's very hard to read otherwise.)

### Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Story points: 3.0
Introduce toggle to disable wallet balance in header

If may not suit some users to expose their wallet balance within the header of the web application, namely users who screencast.

Introduce a simple toggle to allow the user to enable/disable as they wish. The default would be to expose it.

* Introduce a new section with `settings` > `other` called `Privacy` and create a new item called `Wallet` - https://www.sketch.com/s/cc3a6cd0-eb63-4a8d-870f-47b570aec320/a/agkVKgA

* The wallet screen has one single option, which by default is enabled. See https://www.sketch.com/s/cc3a6cd0-eb63-4a8d-870f-47b570aec320/a/ZOv4zMG

* Disabling the above will remove the wallet balance header component from the UI

* For now only use local storage

Story points: 5.0
Coinbase Wallet transfers causing wallet not unlocked error

<!---
Please read this!

Before opening a new issue, make sure to search for keywords in the issues
filtered by the "T - Bug" label and verify the issue you're about to submit isn't a duplicate.
--->

### Summary

Video sent via Bill on Telegram. Member is unable to withdraw because our transfer modal says "Unexpected error. Is your wallet unlocked?".

### Steps to reproduce

Unreplicated, in the video the member simply opens the modal and presses the button to transfer, before seeing the error.

### Platform information 

Member appears to be on Windows using Chrome / Coinbase wallet.

### What is the current *bug* behavior?

Member cannot transfer as it says their wallet is not connected

### What is the expected *correct* behavior?

Member should be able to transfer

### Relevant logs and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's very hard to read otherwise.)

### Possible fixes

As a workaround I wonder if another browser would work - we should still investigate regardless.

Story points: 1.0
Email codes authentication failures

<!---
Please read this!

Before opening a new issue, make sure to search for keywords in the issues
filtered by the "T - Bug" label and verify the issue you're about to submit isn't a duplicate.
--->

### Summary

Some of the users reporting the issue:

* `blackrockbeacon` -  code failure during withdrawal step.  
* `Istruththelight` - code failure during withdrawal step.
* `treekaba` - code failure during withdrawal step.
* `fickleflame` - code failure in Pay Modal when trying to wire to another member. 
* `pinn` - code failure in Pay Modal when trying to wire to another member.
* `MindsGaming` - unable to type code at all

### Steps to reproduce

Unknown at present.

### Platform information 

Varies, web.

### What is the current *bug* behavior?

Users email codes do not work.

### What is the expected *correct* behavior?

Code should authenticate user and allow them to perform the action

### Relevant logs and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's very hard to read otherwise.)

### Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Story points: 3.0
MFA login modal not redirecting from topbar

<!---
Please read this!

Before opening a new issue, make sure to search for keywords in the issues
filtered by the "T - Bug" label and verify the issue you're about to submit isn't a duplicate.
--->

### Summary

MFA login modal is not mobile responsive, and doesn't redirect from homepage when entered

### Steps to reproduce

Try login on mobile with MFA enabled

### Platform information 

Replicated Brave mobile

### What is the current *bug* behavior?

Unresponsive, no redirect

### What is the expected *correct* behavior?

Should fit mobile viewport and should redirect appropriately

### Relevant logs and/or screenshots

![image](/uploads/bc2b5a7221ebc569336ffb1fc9e41882/image.png)

### Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Story points: 2.0
(bug) User profile stuck in infinite loading

Sometimes when I open user profile, I get this loading:

[Loading bug](/uploads/f6e1e8047a3159a09daa7df3f522f39c/2021-09-29_07-44-06.mkv)

Reload of the page usually works. I will try to get network happenings when I get it again.

See https://gitlab.com/minds/front/-/issues/5097 also

Story points: 5.0
Implement PWA service worker

- [ ] Research/confirm we can use service workers with SSR app by testing with basic angular service worker
- [ ] Determine what resources are needed to be listed in the 'app shell' to be cached immediately on install 
- [ ] Implement service worker with Workbox (must be added as a script to index.html)

Resources
- Intro to Service Worker https://www.youtube.com/watch?v=wEPeaJgbIxQ&list=PLNYkxOF6rcIB2xHBZ7opgc2Mv009X87Hh&index=6
- Caching user content https://www.youtube.com/watch?v=vpllowrS55k&list=RDCMUCnUYZLuoy1rq1aVMwx4aTzw&start_radio=1&rv=vpllowrS55k&t=7&t=9
- Using Workbox to manage your caches https://www.youtube.com/watch?v=QHm6-xu4F_I&list=PLNYkxOF6rcIB2xHBZ7opgc2Mv009X87Hh&index=15

Story points: 3.0
Set up PWA

- [x] Make sure PWA meets [installation criteria](https://web.dev/install-criteria/)
- [x] Fine-tune manifest so all resources are included (including external resources such as fonts over cdn) and all fields are filled appropriately (look at https://twitter.com/manifest.json for example)
- [x] Ensure timing of install prompt is not disruptive (e.g. during onboarding)
- [x] Ensure default update strategy is acceptable, and whether we need to notify users of new updates

### Service Worker

- [x] determine whether pwa and ssr play nicely together
  - [x] Research/confirm we can use service workers with SSR app by testing with basic angular service worker
- [ ] determine whether we need an app shell
  - [ ] Determine what resources are needed to be listed in the 'app shell' to be cached immediately on install
- [x] determine between ngsw vs. Workbox
  - [x] Implement service worker with Workbox (must be added as a script to index.html)

### Good to have
- [ ] add client side caching and have a cache for each `get` resource
- [ ] add an offline component that has a retry button and use this component in place of feed, widgets, etc. when there's no network connection
- [ ] add a service (or use an existing one) to detect whether we have network connection

Story points: 5.0
Implement Workbox service worker

- [ ] Research/confirm we can use service workers with SSR app by testing with basic angular service worker
- [ ] Determine what resources are needed to be listed in the 'app shell' to be cached immediately on install 
- [ ] Implement service worker with Workbox (must be added as a script to index.html)

Resources
- Intro to Service Worker https://www.youtube.com/watch?v=wEPeaJgbIxQ&list=PLNYkxOF6rcIB2xHBZ7opgc2Mv009X87Hh&index=6
- Caching user content https://www.youtube.com/watch?v=vpllowrS55k&list=RDCMUCnUYZLuoy1rq1aVMwx4aTzw&start_radio=1&rv=vpllowrS55k&t=7&t=9
- Using Workbox to manage your caches https://www.youtube.com/watch?v=QHm6-xu4F_I&list=PLNYkxOF6rcIB2xHBZ7opgc2Mv009X87Hh&index=15

Story points: 3.0
SKALE Bridge prototype

<!---
Please read this!

Before opening a new issue, make sure to search for keywords in the issues
filtered by the "T - Bug" label and verify the issue you're about to submit isn't a duplicate.
--->

### Summary

(Summarize the bug encountered concisely)

### Steps to reproduce

(How one can reproduce the issue - this is very important)

### Platform information 

(Browser, device, system stats, screen size)

### What is the current *bug* behavior?

(What actually happens)

### What is the expected *correct* behavior?

(What you should see instead)

### Relevant logs and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's very hard to read otherwise.)

### Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Story points: 5.0
New Help Facility Being Linked To Same Browser Tab As Is Used To Display Main Site

<!---
Please read this!

Before opening a new issue, make sure to search for keywords in the issues
filtered by the "T - Bug" label and verify the issue you're about to submit isn't a duplicate.
--->

### Summary

Both /P/ pages footer and user menu help / help desk hrefs displays the new help facility within the same browser tab as is used to display the main site (www.minds.com).

Help facility does not contain any method (ie. href) for users to return to the main site.

### Platform information 

Platform neutral, browser interface.


### Possible fixes

Recommend that the new help facility is displayed within its own browser tab (ie. add `target="_blank"` attribute to relevant hrefs).

Story points: 1.0
Newsfeed Top/Latest Designs

Explore how the newsfeed experience can be improved - Broad task, currently in research

### Deliverables

- [x] Implementation of the designs
- [ ] A/B test to record if engagement increase
- [x] This task replaces the existing Top|Latest bar on the newsfeed

### Known issues
* It is easy to miss posts that were publish since the users last visit
* Multiple successive posts can at time drown out other newsfeed items
* Revisiting the newsfeed within the same user session displays the same content again and again
* It may be demotivating for a user if the first items they see are not as interesting as they could be

### Design Assets

* https://www.sketch.com/s/00f71688-a435-4c27-82c0-299fd810da56/a/l1YjZ7V
* https://www.sketch.com/s/00f71688-a435-4c27-82c0-299fd810da56/a/VrD5y3g
* https://www.sketch.com/s/00f71688-a435-4c27-82c0-299fd810da56/a/7yk9wV7


### Query Logic

FYI @markeharding - My think was that we could display the top three posts, that a user has not yet seen, or if this is not possible, a randomised top three posts. This would remain cached for a period of time, say around 5 - 10 mins. Once the cache has expired, the query would run again and new posts displayed.

Story points: 20.0