Skip to content
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

Added Delete and trasnfer btn #26

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Added Delete and trasnfer btn #26

wants to merge 10 commits into from

Conversation

soundOfff
Copy link
Collaborator

No description provided.

@vercel
Copy link

vercel bot commented Sep 20, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/warkanlock/rarity-visualizer-ui/9M6ZT2DRhiET1bbondronZ6dGaZd
✅ Preview: https://rarity-visualizer-ui-git-tbrasca-buttons-warkanlock.vercel.app

const id = toast.loading("Transfering summoner...");
if (!transferWallet) {
toast.update(id, {
render: `Can't transfer to an empty name!`,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change name for wallet

await context.contract_base.methods
.safeTransferFrom(walletFrom, transferWallet, summonerID)
.send({
from: walletFrom,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not ok, to: property does not exists

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it has to be only this syntax

safeTransferFrom(from, to, tokenId).send({ from : context.accounts[0]})

src/components/TransferModal.js Show resolved Hide resolved
const handleOpenTransferModal = (e) => {
e.preventDefault();
setIsOpenTransferModal(true);
ReactTooltip.rebuild();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this rebuild?

if (summonerId != null) {
const id = toast.loading("Deleting warrior...");
try {
// await context.contract_base.methods
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has to be something like

       .safeTransferFrom(context.accounts[0], "0x000000000000000000000000000000000000dEaD", tokenId)
        .send({
          from: context.accounts[0],
        })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants