|
|
@@ -6,11 +6,13 @@ import { BeaconWallet } from "@taquito/beacon-wallet"; |
|
|
|
const BuyButton = ({ |
|
|
|
Tezos, |
|
|
|
FA2address, |
|
|
|
sender, |
|
|
|
receiver, |
|
|
|
amount |
|
|
|
}: { |
|
|
|
Tezos: TezosToolkit, |
|
|
|
FA2address: string, |
|
|
|
sender: string, |
|
|
|
receiver: string, |
|
|
|
amount: number |
|
|
|
}): JSX.Element => { |
|
|
@@ -20,9 +22,9 @@ const BuyButton = ({ |
|
|
|
|
|
|
|
const transfer_params = [ |
|
|
|
{ |
|
|
|
from_: "tz1LigkX55duWS2pZt4u5qTAWUu6Sb9bMxbg", |
|
|
|
from_: sender, |
|
|
|
txs: [{ |
|
|
|
to_: "tz1hJncvXvL2VyctPE685GJPXDaRJ7dtiwjm", |
|
|
|
to_: receiver, |
|
|
|
token_id:0, |
|
|
|
amount: amount |
|
|
|
}] |
|
|
@@ -38,8 +40,11 @@ const BuyButton = ({ |
|
|
|
<button |
|
|
|
className="myButton" |
|
|
|
onClick={makePayment} |
|
|
|
> |
|
|
|
{FA2address} |
|
|
|
>Transfer {amount} |
|
|
|
µ-tokens from: |
|
|
|
{sender} |
|
|
|
to: |
|
|
|
{receiver} |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
); |